GNU bug report logs -
#75684
persist-defvar symbol bound before definition, causing data loss
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 75684 in the body.
You can then email your comments to 75684 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#75684
; Package
emacs
.
(Mon, 20 Jan 2025 07:50:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Joseph Turner <joseph <at> breatheoutbreathe.in>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 20 Jan 2025 07:50:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Variables defined with persist-defvar which have persisted values are
sometimes bound to their persisted values before the package is loaded.
persist-defvar then incorrectly sets the symbol's persist-default
property to its persisted value, which then causes the persist value to
sometimes be deleted.
The bug in the wild: https://github.com/alphapapa/activities.el/issues/109
I am able to reproduce this issue on Emacs 29.4:
--8<---------------cut here---------------start------------->8---
rm -rf /tmp/test-persist-issue/
mkdir /tmp/test-persist-issue
cat > /tmp/test-persist-issue/init.el <<EOF
(package-initialize)
(unless (package-installed-p 'test-persist-issue)
(package-vc-install "https://git.sr.ht/~breatheoutbreathein/test-persist-issue"))
EOF
emacs --init-directory=/tmp/test-persist-issue/
--8<---------------cut here---------------end--------------->8---
Wait for Emacs to install test-persist-issue.el and persist.el, then:
--8<---------------cut here---------------start------------->8---
(progn
(require 'test-persist-issue)
(setf test-persist-issue 'foo)
(persist-save 'test-persist-issue)
(kill-emacs))
--8<---------------cut here---------------end--------------->8---
/tmp/test-persist-issue/persist/test-persist-issue now exists as
expected. Now run:
--8<---------------cut here---------------start------------->8---
rm -rf /tmp/test-persist-issue/elpa/
emacs --init-directory=/tmp/test-persist-issue/
--8<---------------cut here---------------end--------------->8---
Wait for installation again, then evaluate:
--8<---------------cut here---------------start------------->8---
(progn
;; (persist-default 'test-persist-issue) ;; foo (should be nil)
(persist-save 'test-persist-issue))
--8<---------------cut here---------------end--------------->8---
The second time Emacs is opened, just before the call to persist-defvar
in activities.el, the test-persist-issue variable is already bound to
the persisted value, which results in the persisted value being
incorrectly set as the default.
Why is the persist variable bound before the persist-defvar form?
This example uses package-vc for the sake of reliable bug reproduction,
but the issue also exists with package.el, as in the original report.
Thank you!
Joseph
P.S. The linked git repo contains two files, both of which appear to be
necessary to reproduce the issue. For the sake of future bug
reproduction, I have attached both files to this email.
[test-persist-issue.el (application/emacs-lisp, attachment)]
[test-persist-issue-other-file.el (application/emacs-lisp, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#75684
; Package
emacs
.
(Thu, 23 Jan 2025 04:51:01 GMT)
Full text and
rfc822 format available.
Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):
Three days ago, on 2025-01-19, I submitted bug report #75684. I received
the acknowledgment email, but I don't see the bug report in the mailing
list archive. I know there have been some issues with some of the FSF
infrastructure over the past few days, so I wonder if my bug report was
somehow lost (and maybe other bug reports too?).
Thank you!
Joseph
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#75684
; Package
emacs
.
(Thu, 23 Jan 2025 07:43:01 GMT)
Full text and
rfc822 format available.
Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):
Joseph Turner via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org> writes:
> Three days ago, on 2025-01-19, I submitted bug report #75684. I received
> the acknowledgment email, but I don't see the bug report in the mailing
> list archive. I know there have been some issues with some of the FSF
> infrastructure over the past few days, so I wonder if my bug report was
> somehow lost (and maybe other bug reports too?).
>
> Thank you!
>
> Joseph
Hmm... Now I see this message on the mailing list archives as if it
were bug#75684.
I'll just re-submit my bug report again.
Thanks!
Joseph
Reply sent
to
Joseph Turner <joseph <at> breatheoutbreathe.in>
:
You have taken responsibility.
(Thu, 23 Jan 2025 07:43:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Joseph Turner <joseph <at> breatheoutbreathe.in>
:
bug acknowledged by developer.
(Thu, 23 Jan 2025 07:43:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#75684
; Package
emacs
.
(Thu, 23 Jan 2025 08:23:01 GMT)
Full text and
rfc822 format available.
Message #19 received at 75684 <at> debbugs.gnu.org (full text, mbox):
> Date: Wed, 22 Jan 2025 20:49:43 -0800
> From: Joseph Turner via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>
> Three days ago, on 2025-01-19, I submitted bug report #75684. I received
> the acknowledgment email, but I don't see the bug report in the mailing
> list archive. I know there have been some issues with some of the FSF
> infrastructure over the past few days, so I wonder if my bug report was
> somehow lost (and maybe other bug reports too?).
The bug report is not lost if you can find it on the tracker:
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=75684
That it didn't get to the bug-gnu-emacs list archives yet might be due
to the fact that Michael Albinus is AOK currently. But the list
archives are not necessary to handle the bug, the bug tracker and its
Web interface should be enough.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#75684
; Package
emacs
.
(Thu, 23 Jan 2025 09:21:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 75684 <at> debbugs.gnu.org (full text, mbox):
> Cc: 75684-done <at> debbugs.gnu.org
> Date: Wed, 22 Jan 2025 23:42:25 -0800
> From: Joseph Turner via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>
> Joseph Turner via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org> writes:
>
> > Three days ago, on 2025-01-19, I submitted bug report #75684. I received
> > the acknowledgment email, but I don't see the bug report in the mailing
> > list archive. I know there have been some issues with some of the FSF
> > infrastructure over the past few days, so I wonder if my bug report was
> > somehow lost (and maybe other bug reports too?).
> >
> > Thank you!
> >
> > Joseph
>
> Hmm... Now I see this message on the mailing list archives as if it
> were bug#75684.
>
> I'll just re-submit my bug report again.
There should be no need to do that.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#75684
; Package
emacs
.
(Thu, 23 Jan 2025 20:34:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 75684 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
>> Date: Wed, 22 Jan 2025 20:49:43 -0800
>> From: Joseph Turner via "Bug reports for GNU Emacs,
>> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>>
>> Three days ago, on 2025-01-19, I submitted bug report #75684. I received
>> the acknowledgment email, but I don't see the bug report in the mailing
>> list archive. I know there have been some issues with some of the FSF
>> infrastructure over the past few days, so I wonder if my bug report was
>> somehow lost (and maybe other bug reports too?).
>
> The bug report is not lost if you can find it on the tracker:
>
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=75684
>
> That it didn't get to the bug-gnu-emacs list archives yet might be due
> to the fact that Michael Albinus is AOK currently. But the list
> archives are not necessary to handle the bug, the bug tracker and its
> Web interface should be enough.
Thanks for explaining. In the future, I'll be sure to check the tracker
using that link. Yesterday, I already closed bug#75684 and opened a new
report (bug#75779). Shall I leave things as-is or reopen bug#75684 and
close bug#75779?
Sorry for the noise.
Joseph
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#75684
; Package
emacs
.
(Fri, 24 Jan 2025 07:02:02 GMT)
Full text and
rfc822 format available.
Message #28 received at 75684 <at> debbugs.gnu.org (full text, mbox):
> From: Joseph Turner <joseph <at> breatheoutbreathe.in>
> Cc: 75684 <at> debbugs.gnu.org
> Date: Thu, 23 Jan 2025 12:33:11 -0800
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> >> Date: Wed, 22 Jan 2025 20:49:43 -0800
> >> From: Joseph Turner via "Bug reports for GNU Emacs,
> >> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> >>
> >> Three days ago, on 2025-01-19, I submitted bug report #75684. I received
> >> the acknowledgment email, but I don't see the bug report in the mailing
> >> list archive. I know there have been some issues with some of the FSF
> >> infrastructure over the past few days, so I wonder if my bug report was
> >> somehow lost (and maybe other bug reports too?).
> >
> > The bug report is not lost if you can find it on the tracker:
> >
> > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=75684
> >
> > That it didn't get to the bug-gnu-emacs list archives yet might be due
> > to the fact that Michael Albinus is AOK currently. But the list
> > archives are not necessary to handle the bug, the bug tracker and its
> > Web interface should be enough.
>
> Thanks for explaining. In the future, I'll be sure to check the tracker
> using that link. Yesterday, I already closed bug#75684 and opened a new
> report (bug#75779). Shall I leave things as-is or reopen bug#75684 and
> close bug#75779?
It doesn't really matter. And merging duplicate bugs is IMO better
than closing one of them, btw. Closing a bug means it is either fixed
or invalid, which is not true in this case.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#75684
; Package
emacs
.
(Tue, 28 Jan 2025 01:33:02 GMT)
Full text and
rfc822 format available.
Message #31 received at 75684 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
>> From: Joseph Turner <joseph <at> breatheoutbreathe.in>
>> Cc: 75684 <at> debbugs.gnu.org
>> Date: Thu, 23 Jan 2025 12:33:11 -0800
>>
>> Eli Zaretskii <eliz <at> gnu.org> writes:
>>
>> >> Date: Wed, 22 Jan 2025 20:49:43 -0800
>> >> From: Joseph Turner via "Bug reports for GNU Emacs,
>> >> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>> >>
>> >> Three days ago, on 2025-01-19, I submitted bug report #75684. I received
>> >> the acknowledgment email, but I don't see the bug report in the mailing
>> >> list archive. I know there have been some issues with some of the FSF
>> >> infrastructure over the past few days, so I wonder if my bug report was
>> >> somehow lost (and maybe other bug reports too?).
>> >
>> > The bug report is not lost if you can find it on the tracker:
>> >
>> > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=75684
>> >
>> > That it didn't get to the bug-gnu-emacs list archives yet might be due
>> > to the fact that Michael Albinus is AOK currently. But the list
>> > archives are not necessary to handle the bug, the bug tracker and its
>> > Web interface should be enough.
>>
>> Thanks for explaining. In the future, I'll be sure to check the tracker
>> using that link. Yesterday, I already closed bug#75684 and opened a new
>> report (bug#75779). Shall I leave things as-is or reopen bug#75684 and
>> close bug#75779?
>
> It doesn't really matter. And merging duplicate bugs is IMO better
> than closing one of them, btw. Closing a bug means it is either fixed
> or invalid, which is not true in this case.
Got it. I should have used "merge 75779 75780".
Thank you!
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 25 Feb 2025 12:24:15 GMT)
Full text and
rfc822 format available.
This bug report was last modified 16 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.