[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: blinking the modeline
From: |
Piet van Oostrum |
Subject: |
Re: blinking the modeline |
Date: |
23 Apr 2003 19:19:07 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 |
>>>>> roblist@bigdis.com (Rob Meyer) (RM) wrote:
RM> (defun blink-mode-line ()
RM> "Blink the left character of the mode line"
RM> (interactive)
RM> (message "1: %s" mode-line-inverse-video)
RM> (sleep-for 1)
RM> (setq mode-line-inverse-video (not mode-line-inverse-video))
RM> (message "2: %s" mode-line-inverse-video)
RM> (force-mode-line-update)
RM> (sleep-for 1)
RM> (setq mode-line-inverse-video (not mode-line-inverse-video))
RM> (message "3: %s" mode-line-inverse-video)
RM> )
RM> Does nothing but print the messages, which strangely enough are as I
RM> would expect (t, nil, then t). But no mode-line change at all. If I
RM> comment out the
RM> second setq, then it does change the mode-line once, leaving it the
RM> opposite of it's original state after running. But nothing I do seems
RM> to be able to convince Emacs to flash the mode-line.
Use sit-for rather than sleep-for (sleep-for doesn't redisplay). You could
also display-time which updates the time in the modeline every minute.
However, when there is a lot of crap in the modeline the time will be
pushed out of it.
--
Piet van Oostrum <piet@cs.uu.nl>
URL: http://www.cs.uu.nl/~piet [PGP]
Private email: P.van.Oostrum@hccnet.nl