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


View this message in rfc822 format

From: Ship Mints <shipmints <at> gmail.com>
To: Andrew Cohen <acohen <at> ust.hk>
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: bug#63620: 30.0.50; [Feature Request] run hooks on sleep/wake
Date: Wed, 5 Feb 2025 21:26:17 -0500
[Message part 1 (text/plain, inline)]
I didn't read the code yet so I'm glad this approach doesn't depend on
dbus.

I will happily work on the NS event generation. I can prototype any time
we're ready.

On Wed, Feb 5, 2025 at 21:20 Andrew Cohen <acohen <at> ust.hk> wrote:

> >>>>> "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
>
[Message part 2 (text/html, inline)]

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.