emacs-devel
[Top][All Lists]
Advanced

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

Possible support for buffer local idle timers?


From: Campbell Barton
Subject: Possible support for buffer local idle timers?
Date: Mon, 20 Sep 2021 23:49:28 +1000

Hi, I was wondering if buffer-local idle timers had been considered.

The motivation for this feature is that a buffer-local minor mode may
want to perform an action when emacs is idle.

Currently the only convenient way to do this is to add a global timer
that checks the buffer and it's minor modes.

This has the reasonably big down-side that disabling the idle-timer
requires checking if any buffer currently uses this minor mode,
some packages don't bother and leave it turned on, e.g: [0], so
disabling the mode never turns off the idle timer.

It seems like elisp-only buffer-local idle-timers could be implemented
using something similar to this solution [1],
the main difference would be that the global-idle-timers would be
shared between users with matching delays.

Has this been considered or is there a reason this wouldn't be
acceptable as part of Emacs?

[0]: 
https://github.com/nonsequitur/idle-highlight-mode/blob/master/idle-highlight-mode.el
[1]: https://emacs.stackexchange.com/a/13275/2418



reply via email to

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