GNU bug report logs - #78820
31.0.50; savehist timer does not run repeatedly

Previous Next

Package: emacs;

Reported by: Daniel Mendler <mail <at> daniel-mendler.de>

Date: Wed, 18 Jun 2025 00:24:01 UTC

Severity: normal

Tags: fixed

Found in version 31.0.50

Fixed in version 31.1

Done: Robert Pluim <rpluim <at> gmail.com>

Full log


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

From: Robert Pluim <rpluim <at> gmail.com>
To: <bug-gnu-emacs <at> gnu.org>
Cc: Daniel Mendler <mail <at> daniel-mendler.de>, Eli Zaretskii <eliz <at> gnu.org>,
 78820 <at> debbugs.gnu.org, Stéphane Marks <shipmints <at> gmail.com>,
 monnier <at> iro.umontreal.ca
Subject: Re: bug#78820: 31.0.50; savehist timer does not run repeatedly
Date: Wed, 18 Jun 2025 14:36:44 +0200
>>>>> On Wed, 18 Jun 2025 14:20:11 +0200, Daniel Mendler via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org> said:
    >> (defun savehist--manage-timer ()
    >> ;; should be
    >> (run-with-timer savehist-autosave-interval
    >> savehist-autosave-interval #'savehist-autosave))
    >> ;; not silly t
    >> (run-with-timer savehist-autosave-interval t #'savehist-autosave))

    Daniel> To clarify, with the argument t, the timer does not run repeatedly, but
    Daniel> only once. That's the problem. Btw I wonder if it would make sense to
    Daniel> allow Stéphane's calling convention too and just dtrt. It is not
    Daniel> obviously silly imo.

No need:

    (run-with-timer t savehist-autosave-interval #'savehist-autosave)

already works, although the docstring and the manual donʼt make this
clear, you need to read the manual for `run-at-time' attentively.


Robert
-- 




This bug report was last modified 1 day ago.

Previous Next


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