GNU bug report logs -
#78820
31.0.50; savehist timer does not run repeatedly
Previous Next
To reply to this bug, email your comments to 78820 AT debbugs.gnu.org.
There is no need to reopen the bug first.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
monnier <at> iro.umontreal.ca, bug-gnu-emacs <at> gnu.org
:
bug#78820
; Package
emacs
.
(Wed, 18 Jun 2025 00:24:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Daniel Mendler <mail <at> daniel-mendler.de>
:
New bug report received and forwarded. Copy sent to
monnier <at> iro.umontreal.ca, bug-gnu-emacs <at> gnu.org
.
(Wed, 18 Jun 2025 00:24:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
It seems that the savehist timer does not run repeatedly. run-with-timer
is called with repeat argument t.
(run-with-timer savehist-autosave-interval t #'savehist-autosave)
If I understand correctly, the correct call should look like this:
(run-with-timer t savehist-autosave-interval #'savehist-autosave)
(run-with-timer savehist-autosave-interval savehist-autosave-interval #'savehist-autosave)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#78820
; Package
emacs
.
(Wed, 18 Jun 2025 09:57:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 78820 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Tue, Jun 17, 2025 at 8:24 PM Daniel Mendler via Bug reports for GNU
Emacs, the Swiss army knife of text editors <bug-gnu-emacs <at> gnu.org> wrote:
> It seems that the savehist timer does not run repeatedly. run-with-timer
> is called with repeat argument t.
>
> (run-with-timer savehist-autosave-interval t #'savehist-autosave)
>
> If I understand correctly, the correct call should look like this:
>
> (run-with-timer t savehist-autosave-interval #'savehist-autosave)
> (run-with-timer savehist-autosave-interval savehist-autosave-interval
> #'savehist-autosave)
>
100% right. I think this silly typo/thinko was me. I could submit a patch
but I don't have commit access. It would be faster for this one-liner if
someone else patched.
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#78820
; Package
emacs
.
(Wed, 18 Jun 2025 09:58:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 78820 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Wed, Jun 18, 2025 at 5:56 AM Stéphane Marks <shipmints <at> gmail.com> wrote:
> On Tue, Jun 17, 2025 at 8:24 PM Daniel Mendler via Bug reports for GNU
> Emacs, the Swiss army knife of text editors <bug-gnu-emacs <at> gnu.org> wrote:
>
>> It seems that the savehist timer does not run repeatedly. run-with-timer
>> is called with repeat argument t.
>>
>> (run-with-timer savehist-autosave-interval t #'savehist-autosave)
>>
>> If I understand correctly, the correct call should look like this:
>>
>> (run-with-timer t savehist-autosave-interval #'savehist-autosave)
>> (run-with-timer savehist-autosave-interval savehist-autosave-interval
>> #'savehist-autosave)
>>
>
> 100% right. I think this silly typo/thinko was me. I could submit a
> patch but I don't have commit access. It would be faster for this
> one-liner if someone else patched.
>
Originally bug 75834.
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#78820
; Package
emacs
.
(Wed, 18 Jun 2025 11:55:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 78820 <at> debbugs.gnu.org (full text, mbox):
> Cc: "Stefan Monnier" <monnier <at> iro.umontreal.ca>
> Date: Wed, 18 Jun 2025 02:23:14 +0200
> From: Daniel Mendler via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>
> It seems that the savehist timer does not run repeatedly. run-with-timer
> is called with repeat argument t.
>
> (run-with-timer savehist-autosave-interval t #'savehist-autosave)
>
> If I understand correctly, the correct call should look like this:
>
> (run-with-timer t savehist-autosave-interval #'savehist-autosave)
> (run-with-timer savehist-autosave-interval savehist-autosave-interval #'savehist-autosave)
Why do you think so? The calling sequence of run-with-timer is this:
(run-with-timer SECS REPEAT FUNCTION &rest ARGS)
So what savehist.el does appears to be correct. Or what am I missing?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#78820
; Package
emacs
.
(Wed, 18 Jun 2025 12:13:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 78820 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Wed, Jun 18, 2025 at 7:55 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
> > Cc: "Stefan Monnier" <monnier <at> iro.umontreal.ca>
> > Date: Wed, 18 Jun 2025 02:23:14 +0200
> > From: Daniel Mendler via "Bug reports for GNU Emacs,
> > the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> >
> > It seems that the savehist timer does not run repeatedly. run-with-timer
> > is called with repeat argument t.
> >
> > (run-with-timer savehist-autosave-interval t #'savehist-autosave)
> >
> > If I understand correctly, the correct call should look like this:
> >
> > (run-with-timer t savehist-autosave-interval #'savehist-autosave)
> > (run-with-timer savehist-autosave-interval savehist-autosave-interval
> #'savehist-autosave)
>
> Why do you think so? The calling sequence of run-with-timer is this:
>
> (run-with-timer SECS REPEAT FUNCTION &rest ARGS)
>
> So what savehist.el does appears to be correct. Or what am I missing?
>
(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))
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#78820
; Package
emacs
.
(Wed, 18 Jun 2025 12:21:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 78820 <at> debbugs.gnu.org (full text, mbox):
Stéphane Marks <shipmints <at> gmail.com> writes:
> On Wed, Jun 18, 2025 at 7:55 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
>
>> > Cc: "Stefan Monnier" <monnier <at> iro.umontreal.ca>
>> > Date: Wed, 18 Jun 2025 02:23:14 +0200
>> > From: Daniel Mendler via "Bug reports for GNU Emacs,
>> > the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>> >
>> > It seems that the savehist timer does not run repeatedly. run-with-timer
>> > is called with repeat argument t.
>> >
>> > (run-with-timer savehist-autosave-interval t #'savehist-autosave)
>> >
>> > If I understand correctly, the correct call should look like this:
>> >
>> > (run-with-timer t savehist-autosave-interval #'savehist-autosave)
>> > (run-with-timer savehist-autosave-interval savehist-autosave-interval
>> #'savehist-autosave)
>>
>> Why do you think so? The calling sequence of run-with-timer is this:
>>
>> (run-with-timer SECS REPEAT FUNCTION &rest ARGS)
>>
>> So what savehist.el does appears to be correct. Or what am I missing?
>>
>
> (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))
To clarify, with the argument t, the timer does not run repeatedly, but
only once. That's the problem. Btw I wonder if it would make sense to
allow Stéphane's calling convention too and just dtrt. It is not
obviously silly imo.
Daniel
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#78820
; Package
emacs
.
(Wed, 18 Jun 2025 12:37:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 78820 <at> debbugs.gnu.org (full text, mbox):
>>>>> 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
--
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#78820
; Package
emacs
.
(Wed, 18 Jun 2025 12:38:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#78820
; Package
emacs
.
(Wed, 18 Jun 2025 12:43:02 GMT)
Full text and
rfc822 format available.
Message #29 received at submit <at> debbugs.gnu.org (full text, mbox):
[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)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#78820
; Package
emacs
.
(Wed, 18 Jun 2025 12:43:03 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#78820
; Package
emacs
.
(Wed, 18 Jun 2025 13:33:04 GMT)
Full text and
rfc822 format available.
Message #35 received at 78820 <at> debbugs.gnu.org (full text, mbox):
>>>>> On Wed, 18 Jun 2025 08:41:57 -0400, Stéphane Marks <shipmints <at> gmail.com> said:
>> 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.
>>
Stéphane> Funny perhaps I did that at the time, but I prefer the
Stéphane> more precise form.
Sure, that also works.
Robert
--
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#78820
; Package
emacs
.
(Wed, 18 Jun 2025 15:07:03 GMT)
Full text and
rfc822 format available.
Message #38 received at 78820 <at> debbugs.gnu.org (full text, mbox):
tags 78820 fixed
close 78820 31.1
quit
>>>>> On Wed, 18 Jun 2025 15:31:53 +0200, Robert Pluim <rpluim <at> gmail.com> said:
>>>>> On Wed, 18 Jun 2025 08:41:57 -0400, Stéphane Marks <shipmints <at> gmail.com> said:
>>> 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.
>>>
Stéphane> Funny perhaps I did that at the time, but I prefer the
Stéphane> more precise form.
Robert> Sure, that also works.
Done.
Robert
--
Pushed to master.
318715105d0 2025-06-18T17:03:36+02:00 "Make savehist timer actually repeat"
https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=318715105d05036a2e1307a57b4febcf15048912
Added tag(s) fixed.
Request was from
Robert Pluim <rpluim <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Wed, 18 Jun 2025 15:07:04 GMT)
Full text and
rfc822 format available.
bug marked as fixed in version 31.1, send any further explanations to
78820 <at> debbugs.gnu.org and Daniel Mendler <mail <at> daniel-mendler.de>
Request was from
Robert Pluim <rpluim <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Wed, 18 Jun 2025 15:07:04 GMT)
Full text and
rfc822 format available.
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.