[Top][All Lists]

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

Re: Power: blink-cursor-mode is a pig

From: Eli Zaretskii
Subject: Re: Power: blink-cursor-mode is a pig
Date: Fri, 30 Dec 2011 17:32:55 +0200

> Date: Fri, 30 Dec 2011 03:58:25 -0800
> From: Daniel Colascione <address@hidden>
> CC: address@hidden
> Timers are used for all sorts of things. How is the C layer supposed
> to know the purpose of a particular timer?

See below: you proposed the same solution I had in mind.

> I don't want my cursor-blinking timer to fire, but I might want
> jit-lock to keep fontifying until it's done.

If you want jit-lock to keep working, you already give up saving the
power, so this whole discussion is moot.  Why would one care about the
cursor blinking when they don't care about JIT font lock? if they just
don't like blink-cursor-mode, they can simply turn it off.

> We could add a facility to allow lisp to communicate more information
> about timers to the C layer --- perhaps some kind of timer metadata
> meaning "run this timer only when Emacs has focus".  I consider this
> solution very ugly.

I don't see this as ugly.  We have already many Lisp symbols that have
special properties which guide Emacs what to do or not to do with

> > The loop that does this is always running; it never stops, except
> > for very short periods of time.
> The Emacs main loop does not busy wait!

I didn't say it busy waits.  And I did mention "short periods of
time", see above, during which we wait inside `select'.

> Emacs chooses the timeout by looking at all its pending
> timers and seeing which one will expire soonest.  If the next timer
> isn't due for an hour, Emacs will sleep for an hour before returning
> from select.

So why would it be a problem for Emacs to pay attention to the fact
that it doesn't have focus, and choose the `select' timeout
accordingly when it doesn't?

reply via email to

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