From: Campbell Barton <ideasman42@gmail.com>
To: emacs-devel@gnu.org
Subject: Possible support for buffer local idle timers?
Date: Mon, 20 Sep 2021 23:49:28 +1000 [thread overview]
Message-ID: <CAEcf3NweyHwUU18cTnzS589jP6bDwbCPJnNae=g7jc67FuDnnQ@mail.gmail.com> (raw)
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
next reply other threads:[~2021-09-20 13:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-20 13:49 Campbell Barton [this message]
2021-09-20 15:30 ` Possible support for buffer local idle timers? Eli Zaretskii
2021-09-20 15:50 ` Campbell Barton
2021-09-20 16:08 ` Eli Zaretskii
2021-09-21 0:36 ` Campbell Barton
2021-09-21 6:07 ` Eli Zaretskii
2021-09-21 6:16 ` Lars Ingebrigtsen
2021-09-21 10:19 ` Campbell Barton
2021-09-21 10:43 ` Eli Zaretskii
2021-09-25 7:26 ` Campbell Barton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAEcf3NweyHwUU18cTnzS589jP6bDwbCPJnNae=g7jc67FuDnnQ@mail.gmail.com' \
--to=ideasman42@gmail.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).