Re: How to reset the idle timer?
Stéphane Marks <[email protected]>
| Newsgroups | gmane.emacs.help |
|---|---|
| Message-ID | <CAN+1HbrFQSzUEoEcXb_UKnk0kepo2EDPyC40-zQ-2-vx8W=OOg@mail.gmail.com> |
On Sun, Mar 1, 2026 at 12:09 PM <[email protected]> wrote: > On 2026-03-01, at 03:48, Stéphane Marks <[email protected]> wrote: > > > You could give the new `system-sleep` package a try that is in Emacs 31 > from master. Register a hook on > > `system-sleep-event-functions` and your hook will be notified when the > system is about to sleep or has woken up. This will be > > more reliable than relying on timers, though, if you want to defer some > of the work you could set a one-shot timer upon waking > > to do your work. > > Ha, I had no idea this existed, thanks! From a cursory reading it seems > that this feature is in its early days - it gives me a bit of a vibe of > an unpolished prototype - but it's definitely a great addition to Emacs! > I will certainly blog about is, since it is potentially very useful. > (Not to mention that it seems to bring Emacs even closer to an operating > system;-)). > Prototype is in the eye of the beholder, I suppose. It runs on Linux/D-Bus, MS-Windows, macOS/NS and has been used already by other people. Try it and if you find an issue let us know.