[Top][All Lists]

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

Re: Increasing the rate of modeline display

From: Artur Malabarba
Subject: Re: Increasing the rate of modeline display
Date: Fri, 6 Mar 2015 08:20:41 -0300

> How can Emacs know that the value of the eval form changed?  It can't,
> unless it actually eval's it, can it?

Yes, I understand why the default behavior is like that. I was
wondering whether there was a simple way to change that temporarily
(e.g. have the mode-line update at least once per second).

> You will see that 'display-time', which does similar things, uses a
> timer, which changes the mode-line contents independently of Emacs
> recomputing it.

Thanks for the pointer. I've now resigned to using timers as well
(wasn't terrible, but about half the code is dedicated to that now

> What real-life use case is behind your example?

I'm writing a package that adds a spinner to the mode-line (some form
of simple ascii animation to indicate that there is an ongoing
operation). For that, I need to update the mode-line every second
(preferably twice per second), while the spinner is active.

Here is the (mostly finished) code: https://github.com/Bruce-Connor/spinner.el

reply via email to

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