[Top][All Lists]

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

Re: Calling Lisp from undo.c's record_* functions

From: Stefan Monnier
Subject: Re: Calling Lisp from undo.c's record_* functions
Date: Tue, 17 Nov 2015 21:52:49 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

>> > Would it work to have a non-idle timer that is started once at
>> > startup, and then never shut down, and have its job be put on some
>> > list that the timer will examine?
>> I ruled that out early on in the design cycle because I think it's wrong
>> for an application to have such constant background activity.
> OK, but then the same considerations should prohibit using an idle
> timer, no?

No.  The idle timer won't keep firing while Emacs stays idle.

> How about the following idea: we don't start the timer from
> run_undoable_change; instead, we set a flag there that will be checked
> by the command loop when it finishes execution of a command, and the
> call to start the timer will be made then?  We don't really need to
> attempt to start the timer for each and every change of every buffer,
> do we?

That would work similarly to an idle timer, so yes, that would be OK
(tho an idle timer would be simpler).  It suffers from the same problem
as the idle timer: if there's no user interaction but there's continued
process output, we'll fail to re-run the undo-auto-timer after the
first N seconds of idleness.  Nothing too serious (it's still better
than what we have now anyway), tho.


reply via email to

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