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 #124 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Andrew Cohen <acohen <at> ust.hk>
Cc: 63620 <at> debbugs.gnu.org, "Michael Albinus via Bug reports for GNU Emacs,
 the Swiss army knife of
 text editors" <bug-gnu-emacs <at> gnu.org>, Eli Zaretskii <eliz <at> gnu.org>,
 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 15:05:27 +0100
Andrew Cohen <acohen <at> ust.hk> writes:

Hi Andrew,

> I would change the initial special-event-map binding to 'ignore, so that
> nothing happens until sleep-wake-mode is activated. My current iteration
> installs the handler in the keymap when the mode is activated and
> sets it to 'ignore when its disabled.

Good idea, I change the patch accordingly.

> I think the remaining big question is how to handle inhibiting sleep
> until the sleep-wake code is finished. With dbus.el its straightforward
> (although I still don't know how to close the file descriptor returned
> from the dbus method in lisp; any help?) but I'm not sure what to do
> with other systems. Somehow  sleep-wake-mode needs to communicate that
> it is OK to release inhibition. I guess one way might be to mimic the
> D-Bus method and include a file descriptor in the sleep-event that
> blocks sleep until the fd is closed. But this seems kind of contrived.

I haven't checked this yet. We will do it once the special-event based
approach is accepted.

> Best,
> Andy

Best regards, Michael.




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.