[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [AUCTeX] Notification at end of TeX run

From: Tassilo Horn
Subject: Re: [AUCTeX] Notification at end of TeX run
Date: Tue, 24 Nov 2015 06:12:08 +0100
User-agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (gnu/linux)

Joost Kremers <address@hidden> writes:

Hi Joost,

> On Mon, Nov 23 2015, Tassilo Horn <address@hidden> wrote:
>> Ok, I've renamed it now in the code and the docs, and the old name is
>> now an obsolete variable alias.  
> Cool, I just started (ab)using this hook as follows:
> ```
> (require 'notifications)
> (defun jk-notify-TeX-run-finish (file)
>   "Display a notification when a TeX run is finished."
>   (notifications-notify :title "AUCTeX"
>                         :body (format "Finished: %s\n%s" 
> (file-name-nondirectory file) (current-message))))
> (add-hook 'TeX-after-TeX-LaTeX-command-finished-hook 
> #'jk-notify-TeX-run-finish)
> ```
> Running LaTeX can take a long time (large project, many pictures, slow
> computer sometimes)

Indeed.  I have a 450 pages document here which takes about 14 minutes
to compile from scratch using LuaLaTeX. :-)

> and I tend to switch to something else while LaTeX is doing its
> thing. Now I get a notification when it's done. :)

Nice idea.

> BTW, regarding the `hook' part of the name
> TeX-after-TeX-LaTeX-command-finished-hook, (or the new
> TeX-after-compilation-finished-hook), the Elisp manual, section
> "Hooks" mentions that a name ending in `-hook' indicates that the
> functions in the hook don't take any arguments:
> [...]
> So perhaps, for consistency's sake, the name should be
> `TeX-after-compilation-finished-functions'?

Yes, you are completely right, and now it is named exactly like that.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]