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

From: Stéphane Marks <shipmints <at> gmail.com>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: Daniel Mendler <mail <at> daniel-mendler.de>, bug-gnu-emacs <at> gnu.org,
 78820 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>, monnier <at> iro.umontreal.ca
Subject: Re: bug#78820: 31.0.50; savehist timer does not run repeatedly
Date: Wed, 18 Jun 2025 08:41:57 -0400
[Message part 1 (text/plain, inline)]
On Wed, Jun 18, 2025 at 8:36 AM Robert Pluim <rpluim <at> gmail.com> wrote:

> >>>>> 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.
>

Funny perhaps I did that at the time, but I prefer the more precise form.
[Message part 2 (text/html, inline)]

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.