GNU bug report logs - #63620
30.0.50; [Feature Request] run hooks on sleep/wake

Previous Next

Package: emacs;

Reported by: Andrew Cohen <acohen <at> ust.hk>

Date: Sat, 20 May 2023 23:25:02 UTC

Severity: wishlist

Tags: patch

Found in version 30.0.50

Full log


Message #85 received at 63620 <at> debbugs.gnu.org (full text, mbox):

From: Andrew Cohen <acohen <at> ust.hk>
To: Ship Mints <shipmints <at> gmail.com>
Cc: 63620 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>, michael.albinus <at> gmx.de,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#63620: 30.0.50; [Feature Request] run hooks on sleep/wake
Date: Thu, 06 Feb 2025 10:20:44 +0800
>>>>> "SM" == Ship Mints <shipmints <at> gmail.com> writes:

    SM> If someone builds without dbus, say on macOS, does this approach
    SM> work without dbus?

This assumes that detection of sleep/wake state changes will be added to
the C source (as you offered to implement for NS :)). The idea is that
you add code to detect the change at the OS level, and then create an
event of type sleep-event with an argument of t for sleep and nil for
wake.  The lisp package detects the sleep-event and runs the appropriate
code.

It won't work quite yet (this was just showing the concept) since the C
code has to be written, and the handler function needs to accept either
an event (a cons) or a boolean. But if everyone thinks this is a valid
approach we can take care of this.

Best,
Andy
-- 
Andrew Cohen




This bug report was last modified 130 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.