1

Sometimes when I run a process if there is an error during the process the emacs icon on the windows taskbar lights up, so if I'm in an other app I can see something happened there.

I'd like to use this indication in my elisp programs too. Is there a lisp call which makes the emacs icon light up on the taskbar?

Tom
  • 1,190
  • 7
  • 16
  • Not sure, but maybe this helps? `(let ((visible-bell t)) (ding t))` – Drew Sep 05 '19 at 13:54
  • @Drew I tried it like this `(progn (sleep-for 3) (let ((visible-bell t)) (ding t)))` and it did highlight the emacs icon when I was in an other app. If you post this as an answer I'll accept it. Thanks. – Tom Sep 05 '19 at 15:33
  • OK, I added an answer. – Drew Sep 05 '19 at 15:39

1 Answers1

0

Try using function ding with variable visible-bell bound to non-nil. For example:

(let ((visible-bell t)) (ding t))

If you need to impose a delay before flashing then you can use sit-for or sleep-for. For example:

(let ((visible-bell t))
  (sleep-for 2) ; Wait 2 seconds
  (ding t)) ; Flash screen
Drew
  • 75,699
  • 9
  • 109
  • 225