From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Heerdegen via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#73291: 31.0.50; `clean-buffer-list' activates `midnight-mode' Date: Tue, 17 Sep 2024 21:07:04 +0200 Message-ID: <87bk0mgkvb.fsf@web.de> References: <87plp4vy08.fsf@ledu-giraud.fr> <86ikuvd9tp.fsf@gnu.org> <87frpyofoi.fsf@ledu-giraud.fr> <87frpyh11i.fsf@web.de> <868qvqbdgl.fsf@gnu.org> Reply-To: Michael Heerdegen Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20879"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 73291@debbugs.gnu.org, manuel@ledu-giraud.fr To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 17 21:07:06 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sqdXV-0005Fn-3M for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 17 Sep 2024 21:07:05 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sqdXF-0005r6-GP; Tue, 17 Sep 2024 15:06:49 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sqdXD-0005qp-St for bug-gnu-emacs@gnu.org; Tue, 17 Sep 2024 15:06:48 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sqdXD-0000mG-Jm for bug-gnu-emacs@gnu.org; Tue, 17 Sep 2024 15:06:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=eNijYnylC5S0bhUEflyKTkrWkZ15JD88mm2EHdfmCJY=; b=r8C3ZzVW/SuWW/TUhsG8LAFIT/mPk19KeKpMxA8Y4o5V2xhP5w/tm8+pZ+qh4ZMXguez9Nnwqyqyo54YplpNXBBY/CR3os29c2ZMJLUf4koa4xqJ/7nqj7ddaT1ECQUzkoW8i8x7DOr3s6n70FAkpQw1bDghiabT3RBkMupIHv6d/dZdtPoZWt30z0SdJqLjNLAnad3D+BeBPRGia/SBj5GTYhDraWmzkdpO5T/KVOKSFrZLanp8ARFQZctXSQkMz/pxEfcc7nnYA6CdSVBO3Twzd/JuRqib7Ag0DSzWPIdja7P7pffnV0Kn1GaMyqxU40ScREvmR9+JWxW4SnJNwA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sqdXS-00075Y-I0 for bug-gnu-emacs@gnu.org; Tue, 17 Sep 2024 15:07:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Heerdegen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 17 Sep 2024 19:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73291 X-GNU-PR-Package: emacs Original-Received: via spool by 73291-submit@debbugs.gnu.org id=B73291.172659999527202 (code B ref 73291); Tue, 17 Sep 2024 19:07:02 +0000 Original-Received: (at 73291) by debbugs.gnu.org; 17 Sep 2024 19:06:35 +0000 Original-Received: from localhost ([127.0.0.1]:55966 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sqdX0-00074f-TK for submit@debbugs.gnu.org; Tue, 17 Sep 2024 15:06:35 -0400 Original-Received: from mout.web.de ([212.227.15.3]:44623) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sqdWy-00074N-Gs for 73291@debbugs.gnu.org; Tue, 17 Sep 2024 15:06:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=web.de; s=s29768273; t=1726599970; x=1727204770; i=michael_heerdegen@web.de; bh=eNijYnylC5S0bhUEflyKTkrWkZ15JD88mm2EHdfmCJY=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=jaHpcYyXidhU7bkvFU7B1r1QcFUPgEHN8pqALJefug8acrxucvgnijQZgStZBxU7 3zcAfUqEP1rHq3/sgzVy/GqNnBmXGZQuyNMP7bcOBQsOt/C/UWdqpdzpPTE6M9BXX GGHsNi4QbbTrzZf5pQ1g+SxOrfryTvnKpTxVhPOVgufvqzWB7MFvxZRoi+yEJkIod R3msdnVVMqeicw5yFrlxsvsx9c26fnyvx3IBBpfuNRH1wQaigx3I3jktsPsmAEuCg CzNVfVYxiqXK3LsysO51WE45XD71z0Ypv6kN0uOXBtZB8gqkVl1V+yoVyDA0m2SOj L583bAf3MvbYCXjPSA== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Original-Received: from drachen.dragon ([88.66.201.158]) by smtp.web.de (mrweb005 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MdwJO-1sIxCW1326-00okxx; Tue, 17 Sep 2024 21:06:10 +0200 In-Reply-To: <868qvqbdgl.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 17 Sep 2024 16:46:02 +0300") X-Provags-ID: V03:K1:rPrdBup/FcA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: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:291961 Archived-At: Eli Zaretskii 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.