emacs-devel
[Top][All Lists]
Advanced

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

Re: Support for explicitly resetting the idle timer?


From: Campbell Barton
Subject: Re: Support for explicitly resetting the idle timer?
Date: Sat, 27 Nov 2021 22:16:10 +1100

On Sat, Nov 27, 2021 at 9:54 PM Eli Zaretskii <eliz@gnu.org> wrote:
>
> > From: Campbell Barton <ideasman42@gmail.com>
> > Date: Sat, 27 Nov 2021 21:21:29 +1100
> > Cc: Emacs developers <emacs-devel@gnu.org>
> >
> > > > > Which code invokes set-window-vscroll, and what triggers that code?
> > > >
> > > > There is a while loop that uses  (read-event) inside a `(track-mouse
> > > > ...)` block that changes the scroll location and redraws.
> > >
> > > But that while loop is invoked by some binding of some mouse gesture,
> > > no?  That binding _is_ the "command" I meant.
> >
> > Ah, right. There is an interactive function bound to a key which runs
> > track-mouse ... etc.
>
> So now I wonder how come the idle timers run for you.  Perhaps the
> command you mention activates track-mouse and exits?

It also seems strange to me, but it's not exiting - it runs
track-mouse and calls read-event & redisplay, just double checked -
idle timers are definitely running inside the track-mouse block (which
is within the command).

> > Arguments could be made against this:
> >
> > - This could break existing packages that use long running commands
> > and expect the idle timer to run.
>
> While a command's code runs, idle timers cannot run, because timers
> only run when Emacs is in its idle loop, waiting for some input.
> Emacs only gets to the idle loop after a command exits and there's no
> further input waiting for processing.

It's possible there is something more specific to my package than I
realized (although I'm not sure what as it's basically re-displaying
in a loop).

-- 
- Campbell



reply via email to

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