GNU bug report logs - #73291
31.0.50; `clean-buffer-list' activates `midnight-mode'

Previous Next

Package: emacs;

Reported by: Manuel Giraud <manuel <at> ledu-giraud.fr>

Date: Mon, 16 Sep 2024 07:51:02 UTC

Severity: normal

Found in version 31.0.50

Fixed in version 31.1

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 73291 <at> debbugs.gnu.org, manuel <at> ledu-giraud.fr
Subject: bug#73291: 31.0.50; `clean-buffer-list' activates `midnight-mode'
Date: Tue, 17 Sep 2024 21:07:04 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

> Alternatively, we could call run-at-time directly from midnight-mode.

Short answer: This would be better.

Long answer: The current design is bad: `midnight-delay-set', the custom
setter of the user option `midnight-delay', is the _only_ place in the
whole library where a timer is ever created.  The mode function itself
does not start a timer (also not indirectly).

`midnight-delay-set' OTOH starts the timer unconditionally, no matter if
`midnight-mode' is on or off.  The timer function also doesn't check
whether the mode is on.

We need to redesign: we should make the mode start and stop the timer.
The setter function should only manipulate the timer, and only when the
mode is really turned on.


Michael.




This bug report was last modified 239 days ago.

Previous Next


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