Subject: Re: bug#51132: Make sure user is doubly aware of finished complilations

From: Kévin Le Gouguec <[email-masked]>
Date: Mon, 11 Oct 2021 11:21:04 +0200

Lars Ingebrigtsen <[email-masked]> writes:

> 積丹尼 Dan Jacobson <[email-masked]> writes:
>
>> That's good. Because "Nobody is going to sit in the Laundromat watching
>> the dryer spin." They'll be somewhere else doing something else. (I.e.,
>> they won't be staring at the *compilation* buffer.)
>>
>> OK, but then it disappears when the compilation is over.
>
> A message is issued, and I think that's sufficient.  Closing.

Note that you can customize compilation-finish-functions to do all sorts
of things; you can e.g. send a desktop notification:

#+begin_src elisp
(defun my/compilation-notify (buffer results)
  (require 'notifications)
  (notifications-notify :title (buffer-name buffer) :body results :timeout 0))

(add-to-list 'compilation-finish-functions 'my/compilation-notify)
#+end_src

':timeout 0' should ensure that the notification popup remains until you
dimiss it manually.

Writing a function that adds « "Compilation Finished" and red, and
flashing, etc. » to the mode-line is left as an exercise to the reader
:)