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 21:21:29 +1100

On Sat, Nov 27, 2021 at 9:10 PM Eli Zaretskii <eliz@gnu.org> wrote:
>
> > From: Campbell Barton <ideasman42@gmail.com>
> > Date: Sat, 27 Nov 2021 20:14:44 +1100
> > Cc: Emacs developers <emacs-devel@gnu.org>
> >
> > > > Not sure if this would solve my case (is there some formal definition
> > > > of what is meant by a command?).
> > > > I'm changing the scroll position using `set-window-vscroll` - so I'm
> > > > not sure if that counts as a command.
> > >
> > > 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.
>
> > (any solution shouldn't be so specific to my use-case of course,
> > AFAICS it's just a case that is reasonable to support with whatever
> > fix/feature is used).
>
> Any solution that makes sure idle timers don't run when Emacs executes
> a command is not specific to any use case, IMO.

Okay, that makes sense then, yes - it seems reasonable.

Arguments could be made against this:

- This could break existing packages that use long running commands
and expect the idle timer to run.
- Any developer running into this situation in the future (idle timers
and track-mouse that is) - might reasonably expect idle timers to
activate when the user isn't moving the mouse.

However if the change in behavior is acceptable by emacs developers,
I'm not pushing against it - just noting some possible down-sides.

-- 
- Campbell



reply via email to

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