Subject: bug#78820: 31.0.50; savehist timer does not run repeatedly

From: Robert Pluim <[email-masked]>
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" <[email-masked]> 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
--