GNU bug report logs - #54346
persist-save doesn't persist variables when the value is set to the default

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Gulshan Singh <gsingh2011@HIDDEN>; dated Sat, 12 Mar 2022 01:17:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 54346 <at> debbugs.gnu.org:


Received: (at 54346) by debbugs.gnu.org; 11 Apr 2022 10:18:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Apr 11 06:18:19 2022
Received: from localhost ([127.0.0.1]:42578 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ndr7j-00010C-H8
	for submit <at> debbugs.gnu.org; Mon, 11 Apr 2022 06:18:19 -0400
Received: from quimby.gnus.org ([95.216.78.240]:34374)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1ndr7i-0000zz-35
 for 54346 <at> debbugs.gnu.org; Mon, 11 Apr 2022 06:18:18 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=KKUn26uZWrJChpePlZN5Thyi6xhVCJOyhAsP4pGgRxw=; b=EZ8yGV6tNIaehc366F/N9pBieU
 nmP7L7m17Q5BkgesdjgC9KSw9yH3JJ/whlBiG3Wrpi/LSdsDm4emtdcTaNuLTWzZAGz5iJPJJI02n
 0ht669t9dTlaBcwQpj/AK1GOghgq8AEDMaJKre04c2za3aUmrM+qlUkKhNNEwQM6y5rg=;
Received: from [84.212.220.105] (helo=xo)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1ndr7Y-0001fH-9c; Mon, 11 Apr 2022 12:18:10 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Gulshan Singh <gsingh2011@HIDDEN>
Subject: Re: bug#54346: persist-save doesn't persist variables when the
 value is set to the default
References: <CANEZYrdHs+8cA9m4YQWQYtqnti1dCO9ADky=jdMtTEarUwkkzQ@HIDDEN>
 <87r177ysjh.fsf@HIDDEN>
 <CANEZYrfCok3x+GoPaZu-_gFO9iEDJdqjXUTFpsNkSL4BCD0sVw@HIDDEN>
 <87pmlpqgix.fsf@HIDDEN>
 <CANEZYre0CoF2qs-UsJ3FN08F_4FYTGWmTTBP4L_KHqzhrumdgw@HIDDEN>
Date: Mon, 11 Apr 2022 12:18:01 +0200
In-Reply-To: <CANEZYre0CoF2qs-UsJ3FN08F_4FYTGWmTTBP4L_KHqzhrumdgw@HIDDEN>
 (Gulshan Singh's message of "Sun, 10 Apr 2022 12:36:54 -0700")
Message-ID: <87ee23diue.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Gulshan Singh <gsingh2011@HIDDEN> writes: > I cloned the
 upstream project [1] and created a merge request [2] > there. The fix deletes
 the persist file when it gets set back to the > default value, and it modifies
 a test to verify this behavi [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 54346
Cc: 54346 <at> debbugs.gnu.org, Phillip Lord <phillip.lord@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Gulshan Singh <gsingh2011@HIDDEN> writes:

> I cloned the upstream project [1] and created a merge request [2]
> there. The fix deletes the persist file when it gets set back to the
> default value, and it modifies a test to verify this behavior. I've
> attached the same patch here (created with `git format-patch HEAD^`, I
> haven't submitted a patch here before so let me know if this is the
> correct way to do this).

Yup; looks good.

> I'm a little confused though, I see that on the externals/persist
> branch [3] there is a commit that does not exist on the upstream
> GitLab project. Why is this the case? Should I actually be making a
> patch off of the externals/persist branch?

That's my error -- I didn't check whether it persist was maintained
externally before making that change.  So it should be merged upstream.

Phillip?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#54346; Package emacs. Full text available.

Message received at 54346 <at> debbugs.gnu.org:


Received: (at 54346) by debbugs.gnu.org; 10 Apr 2022 19:37:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Apr 10 15:37:13 2022
Received: from localhost ([127.0.0.1]:41553 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nddN3-0006je-2k
	for submit <at> debbugs.gnu.org; Sun, 10 Apr 2022 15:37:13 -0400
Received: from mail-oi1-f179.google.com ([209.85.167.179]:41910)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gsingh2011@HIDDEN>) id 1nddN1-0006jR-Ca
 for 54346 <at> debbugs.gnu.org; Sun, 10 Apr 2022 15:37:11 -0400
Received: by mail-oi1-f179.google.com with SMTP id e189so13968426oia.8
 for <54346 <at> debbugs.gnu.org>; Sun, 10 Apr 2022 12:37:11 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=K1K+I0QqeIwIZtPWzwrvHhV51a3qiqyyNjktqKr4KfM=;
 b=qz10AOs0RIyKZlZ7Mw4bki+SoHmNmy0rfeS6BBK/epaf/8c6pE/5KwsOp2jfFHHsax
 D0Re3Ih2xT0fKjeuiVWNy28ud0+Fwj/iVFQrUbuvu+RKOXKgecWpa/J3n1m1fqCVqfE0
 44cFW8yF9n3qVNWeEJB+pM2XjByrTkVgc/HmDDiLPn6AbIxDirCjU6IL411wXIvWDokC
 ncBCky6lM92i13TPpjNy2rCO0bNH2uR1djXbsc6/oAQQiYHES2aLqkguHBFyzLb8MYoA
 p57NEcSDUfSn+G0ifrp4gfyNg/yNNYwhjWSZpOXdR/OFwvQNO3QRmhfJJUqrPcZ06GEx
 l21Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=K1K+I0QqeIwIZtPWzwrvHhV51a3qiqyyNjktqKr4KfM=;
 b=g3nDwXEXZY+/AareOQiG3X4lWJnQXMsW47FFrPcznY+5elfd3F4BqQqS5UkeGZr+bk
 CQmvFPtCv+SunXLncHbQtoJ9p5yQ2PtKJbBW8RwdGYf8ISaYrn0TV65o9KQOjlgATYrZ
 spWZct0GzFndEQ+i22YgJ6PuTMp2jiy5vq5br1e8l4AU2pext9oJ8F1MdThUwgNXrVq0
 Ld/A31HT1AWi6Qmgx0vLlc0XrzuwKcsp0GrTMF6tJyuktWf+fnxnGIgEmgjoBMFbHQb7
 XlGgb6nlSucgD96MkduZ1Oq6Ts92vqzfG1whEc1RZ055H4Wh1ceGZaRwLGN+6J2XKAJ1
 U2OQ==
X-Gm-Message-State: AOAM530JVo08w9sTPYte3aj0bTYXYo1hhUNwBLLzXI4WjUy1JWAe2dEJ
 6fCISBs1XQEMoZ5XPoL1xbP0SUfeVgkma/jVV7eXEZTZVHI=
X-Google-Smtp-Source: ABdhPJwtcnkgqJBc/I8cGPEEIs6VxEDemujcPvQlsoCl4pOxczBrA5tp8AK2zHi456/5zJ8iwA0l7Vu1XNgQfx++Gq8=
X-Received: by 2002:a05:6808:3094:b0:2f9:61ab:32fc with SMTP id
 bl20-20020a056808309400b002f961ab32fcmr4109506oib.261.1649619425560; Sun, 10
 Apr 2022 12:37:05 -0700 (PDT)
MIME-Version: 1.0
References: <CANEZYrdHs+8cA9m4YQWQYtqnti1dCO9ADky=jdMtTEarUwkkzQ@HIDDEN>
 <87r177ysjh.fsf@HIDDEN>
 <CANEZYrfCok3x+GoPaZu-_gFO9iEDJdqjXUTFpsNkSL4BCD0sVw@HIDDEN>
 <87pmlpqgix.fsf@HIDDEN>
In-Reply-To: <87pmlpqgix.fsf@HIDDEN>
From: Gulshan Singh <gsingh2011@HIDDEN>
Date: Sun, 10 Apr 2022 12:36:54 -0700
Message-ID: <CANEZYre0CoF2qs-UsJ3FN08F_4FYTGWmTTBP4L_KHqzhrumdgw@HIDDEN>
Subject: Re: bug#54346: persist-save doesn't persist variables when the value
 is set to the default
To: Lars Ingebrigtsen <larsi@HIDDEN>
Content-Type: multipart/mixed; boundary="000000000000e0251c05dc51f348"
X-Spam-Score: 0.2 (/)
X-Debbugs-Envelope-To: 54346
Cc: 54346 <at> debbugs.gnu.org, Phillip Lord <phillip.lord@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.8 (/)

--000000000000e0251c05dc51f348
Content-Type: text/plain; charset="UTF-8"

Hi,

I cloned the upstream project [1] and created a merge request [2]
there. The fix deletes the persist file when it gets set back to the
default value, and it modifies a test to verify this behavior. I've
attached the same patch here (created with `git format-patch HEAD^`, I
haven't submitted a patch here before so let me know if this is the
correct way to do this).

I'm a little confused though, I see that on the externals/persist
branch [3] there is a commit that does not exist on the upstream
GitLab project. Why is this the case? Should I actually be making a
patch off of the externals/persist branch?

[1] https://gitlab.com/phillord/persist/
[2] https://gitlab.com/phillord/persist/-/merge_requests/1
[3] https://git.savannah.gnu.org/cgit/emacs/elpa.git/log/?h=externals/persist

On Sun, Apr 10, 2022 at 5:17 AM Lars Ingebrigtsen <larsi@HIDDEN> wrote:
>
> Gulshan Singh <gsingh2011@HIDDEN> writes:
>
> > If either of these solutions make sense, or if Phillip has any other
> > suggestions, I'd be happy to make the fix myself if that would be
> > easier.
>
> Yes, that'd be great (and post the patch here).
>
> --
> (domestic pets only, the antidote for overdose, milk.)
>    bloggy blog: http://lars.ingebrigtsen.no

--000000000000e0251c05dc51f348
Content-Type: application/octet-stream; 
	name="0001-Delete-persist-file-when-symbol-is-set-to-default-va.patch"
Content-Disposition: attachment; 
	filename="0001-Delete-persist-file-when-symbol-is-set-to-default-va.patch"
Content-Transfer-Encoding: base64
Content-ID: <f_l1toih1n0>
X-Attachment-Id: f_l1toih1n0

RnJvbSBiMDQ5NmE1YTg4NDhkMTEyMzNmMjQxZjZiNzhmMDBmMTUzNjQxMGQ2IE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBHdWxzaGFuIFNpbmdoIDxnc2luZ2gyMDExQGdtYWlsLmNvbT4K
RGF0ZTogU3VuLCAxMCBBcHIgMjAyMiAxMjoxMzozMSAtMDcwMApTdWJqZWN0OiBbUEFUQ0hdIERl
bGV0ZSBwZXJzaXN0IGZpbGUgd2hlbiBzeW1ib2wgaXMgc2V0IHRvIGRlZmF1bHQgdmFsdWUKCi0t
LQogcGVyc2lzdC5lbCAgICAgICAgICAgIHwgMjYgKysrKysrKysrKysrKystLS0tLS0tLS0tLS0K
IHRlc3QvcGVyc2lzdC10ZXN0cy5lbCB8ICAzICsrKwogMiBmaWxlcyBjaGFuZ2VkLCAxNyBpbnNl
cnRpb25zKCspLCAxMiBkZWxldGlvbnMoLSkKCmRpZmYgLS1naXQgYS9wZXJzaXN0LmVsIGIvcGVy
c2lzdC5lbAppbmRleCAwOTFlNDI4Li44YjY0NWVhIDEwMDY0NAotLS0gYS9wZXJzaXN0LmVsCisr
KyBiL3BlcnNpc3QuZWwKQEAgLTEzMiwxOCArMTMyLDIwIEBAIHZhcmlhYmxlcyBwZXJzaXN0IGF1
dG9tYXRpY2FsbHkgd2hlbiBFbWFjcyBleGl0cy4iCiAgICh1bmxlc3MgKHBlcnNpc3QtLXBlcnNp
c3RhbnQtcCBzeW1ib2wpCiAgICAgKGVycm9yIChmb3JtYXQKICAgICAgICAgICAgICJTeW1ib2wg
JXMgaXMgbm90IHBlcnNpc3RhbnQiIHN5bWJvbCkpKQotICAodW5sZXNzIChlcXVhbCAoc3ltYm9s
LXZhbHVlIHN5bWJvbCkKLSAgICAgICAgICAgICAgICAgKHBlcnNpc3QtZGVmYXVsdCBzeW1ib2wp
KQotICAgIChsZXQgKChkaXItbG9jCi0gICAgICAgICAgIChmaWxlLW5hbWUtZGlyZWN0b3J5Ci0g
ICAgICAgICAgICAocGVyc2lzdC0tZmlsZS1sb2NhdGlvbiBzeW1ib2wpKSkpCi0gICAgICAodW5s
ZXNzIChmaWxlLWV4aXN0cy1wIGRpci1sb2MpCi0gICAgICAgIChta2RpciBkaXItbG9jKSkpCi0g
ICAgKHdpdGgtdGVtcC1idWZmZXIKLSAgICAgIChwcmludCAoc3ltYm9sLXZhbHVlIHN5bWJvbCkg
KGN1cnJlbnQtYnVmZmVyKSkKLSAgICAgICh3cml0ZS1yZWdpb24gKHBvaW50LW1pbikgKHBvaW50
LW1heCkKLSAgICAgICAgICAgICAgICAgICAgKHBlcnNpc3QtLWZpbGUtbG9jYXRpb24gc3ltYm9s
KQotICAgICAgICAgICAgICAgICAgICBuaWwgJ3F1aWV0KSkpKQorICAobGV0ICgoc3ltYm9sLWZp
bGUtbG9jIChwZXJzaXN0LS1maWxlLWxvY2F0aW9uIHN5bWJvbCkpKQorICAgIChpZiAoZXF1YWwg
KHN5bWJvbC12YWx1ZSBzeW1ib2wpCisgICAgICAgICAgICAgICAocGVyc2lzdC1kZWZhdWx0IHN5
bWJvbCkpCisgICAgICAgICh3aGVuIChmaWxlLWV4aXN0cy1wIHN5bWJvbC1maWxlLWxvYykKKyAg
ICAgICAgICAoZGVsZXRlLWZpbGUgc3ltYm9sLWZpbGUtbG9jKSkKKyAgICAgIChsZXQgKChkaXIt
bG9jCisgICAgICAgICAgICAgKGZpbGUtbmFtZS1kaXJlY3Rvcnkgc3ltYm9sLWZpbGUtbG9jKSkp
CisgICAgICAgICh1bmxlc3MgKGZpbGUtZXhpc3RzLXAgZGlyLWxvYykKKyAgICAgICAgICAobWtk
aXIgZGlyLWxvYykpCisgICAgICAgICh3aXRoLXRlbXAtYnVmZmVyCisgICAgICAgICAgKHByaW50
IChzeW1ib2wtdmFsdWUgc3ltYm9sKSAoY3VycmVudC1idWZmZXIpKQorICAgICAgICAgICh3cml0
ZS1yZWdpb24gKHBvaW50LW1pbikgKHBvaW50LW1heCkKKyAgICAgICAgICAgICAgICAgICAgICAg
IHN5bWJvbC1maWxlLWxvYworICAgICAgICAgICAgICAgICAgICAgICAgbmlsICdxdWlldCkpKSkp
KQogCiAoZGVmdW4gcGVyc2lzdC1kZWZhdWx0IChzeW1ib2wpCiAgICJSZXR1cm4gdGhlIGRlZmF1
bHQgdmFsdWUgZm9yIFNZTUJPTC4iCmRpZmYgLS1naXQgYS90ZXN0L3BlcnNpc3QtdGVzdHMuZWwg
Yi90ZXN0L3BlcnNpc3QtdGVzdHMuZWwKaW5kZXggOWZhNDA2Zi4uYjY2NDVhOSAxMDA2NDQKLS0t
IGEvdGVzdC9wZXJzaXN0LXRlc3RzLmVsCisrKyBiL3Rlc3QvcGVyc2lzdC10ZXN0cy5lbApAQCAt
NDQsNiArNDQsOSBAQAogICAgICAgICh3aXRoLXRlbXAtYnVmZmVyCiAgICAgICAgICAoaW5zZXJ0
LWZpbGUtY29udGVudHMgKHBlcnNpc3QtLWZpbGUtbG9jYXRpb24gc3ltKSkKICAgICAgICAgIChi
dWZmZXItc3RyaW5nKSkpKQorICAgICAoc2V0IHN5bSAxMCkKKyAgICAgKHBlcnNpc3Qtc2F2ZSBz
eW0pCisgICAgIChzaG91bGQtbm90IChmaWxlLWV4aXN0cy1wIChwZXJzaXN0LS1maWxlLWxvY2F0
aW9uIHN5bSkpKQogICAgICAoc2hvdWxkLWVycm9yCiAgICAgICAocGVyc2lzdC1zYXZlICdmcmVk
KSkpKSkKIAotLSAKMi4zNS4xLjExNzguZzRmMTY1OWQ0NzYtZ29vZwoK
--000000000000e0251c05dc51f348--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#54346; Package emacs. Full text available.

Message received at 54346 <at> debbugs.gnu.org:


Received: (at 54346) by debbugs.gnu.org; 10 Apr 2022 12:17:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Apr 10 08:17:41 2022
Received: from localhost ([127.0.0.1]:39643 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ndWVg-0004zs-Ub
	for submit <at> debbugs.gnu.org; Sun, 10 Apr 2022 08:17:41 -0400
Received: from quimby.gnus.org ([95.216.78.240]:52222)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1ndWVf-0004zf-Lw
 for 54346 <at> debbugs.gnu.org; Sun, 10 Apr 2022 08:17:40 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=EY/dwQB6h4LeG8zJ9VCRhJmX/hJHzZHhrcpSadbFXHE=; b=UTWMKnklj3Dj/dcEBnj3HjFkpw
 ZE5Yb60uSsuXZ8SgyOLC5Tis8DWxtrwtKYIlJcqeZe4l+BXFIEwjFkKeA5BsztL2adJGC1iQ/Zxgx
 xx2QdNiW2ttYziHESqM8vQDZ5mId9gEBHg69FTCYPtNpf1tu7g3fr6r4tgP4ikc+/r/Y=;
Received: from [84.212.220.105] (helo=xo)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1ndWVT-0006JD-Cy; Sun, 10 Apr 2022 14:17:32 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Gulshan Singh <gsingh2011@HIDDEN>
Subject: Re: bug#54346: persist-save doesn't persist variables when the
 value is set to the default
References: <CANEZYrdHs+8cA9m4YQWQYtqnti1dCO9ADky=jdMtTEarUwkkzQ@HIDDEN>
 <87r177ysjh.fsf@HIDDEN>
 <CANEZYrfCok3x+GoPaZu-_gFO9iEDJdqjXUTFpsNkSL4BCD0sVw@HIDDEN>
X-Now-Playing: Arto Lindsay's _Salt_: =?utf-8?Q?=22Combust=C3=ADvel=22?=
Date: Sun, 10 Apr 2022 14:17:26 +0200
In-Reply-To: <CANEZYrfCok3x+GoPaZu-_gFO9iEDJdqjXUTFpsNkSL4BCD0sVw@HIDDEN>
 (Gulshan Singh's message of "Sat, 9 Apr 2022 14:45:38 -0700")
Message-ID: <87pmlpqgix.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Gulshan Singh <gsingh2011@HIDDEN> writes: > If either of
 these solutions make sense, or if Phillip has any other > suggestions, I'd
 be happy to make the fix myself if that would be > easier. Yes, that'd be
 great (and post the patch here). 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 54346
Cc: 54346 <at> debbugs.gnu.org, Phillip Lord <phillip.lord@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Gulshan Singh <gsingh2011@HIDDEN> writes:

> If either of these solutions make sense, or if Phillip has any other
> suggestions, I'd be happy to make the fix myself if that would be
> easier.

Yes, that'd be great (and post the patch here).

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#54346; Package emacs. Full text available.

Message received at 54346 <at> debbugs.gnu.org:


Received: (at 54346) by debbugs.gnu.org; 9 Apr 2022 21:45:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 09 17:45:57 2022
Received: from localhost ([127.0.0.1]:38837 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ndIu5-0004r1-3x
	for submit <at> debbugs.gnu.org; Sat, 09 Apr 2022 17:45:57 -0400
Received: from mail-oa1-f43.google.com ([209.85.160.43]:37256)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gsingh2011@HIDDEN>) id 1ndIu2-0004qo-MT
 for 54346 <at> debbugs.gnu.org; Sat, 09 Apr 2022 17:45:55 -0400
Received: by mail-oa1-f43.google.com with SMTP id
 586e51a60fabf-e2a00f2cc8so3859980fac.4
 for <54346 <at> debbugs.gnu.org>; Sat, 09 Apr 2022 14:45:54 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=4hlxr3goi5EEPNRhl/jhtH+iKySqiaylSzeu/+5abq0=;
 b=F9jV67bMkhI6k9zyJs7eXLv0uoapyt24u7+rn/Vs7XyL9CdxSm/ElI66V+4/OegYtp
 lB6vyjdn9G/xxZR46tfy4eRIii5ZEMYcBl0QsDN1gJfacKVuk3IRFRm7frLidJ5GWrTC
 A8FWhD5MX7WZmTaYh718a0c0JFHUJK5wFi9xlrY2x9Y44SP4Lc9lR6BKv9CXPnzaNdWy
 qIxRQ4itmtY8FEyHWOmPzGrGnBD9o12k4vtcLFs3EwHtatw3PEmTVOCRwahmN1Wo9WHl
 WJlup0fqjUMtA5aH/lTCRbhJ4wZtyWLFGmJFXW1gw0mLwM0hr/RWbomN2RI2VuG9VJbY
 oYuA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=4hlxr3goi5EEPNRhl/jhtH+iKySqiaylSzeu/+5abq0=;
 b=zwqWbAMaHbOHLXDKmGLhB9mAhbMWKZ8vpYx8nd8Pd6B4WEg/cDz+zs2kIbHZ+9Dv7L
 cwy+gA2clJU6CSK2SvyZJKDFUMFH6kdPrQ6HVydzS/T0BxkknsR59JnPfo+9GYzC09zZ
 8HHObf9lLdmT45mRm5HpEpn/v/sq8RQYNSHg+8ACuiNgNdA4f2qF2gjLyG1F3Qrc4i5d
 Kg4saYJymRWeRl7tDx2sdQfU+f3SMzLMaXZt5Oi6DN5N1wzz7HcKFxGuq+4utUqwFTtY
 inzXvGQ0aD5R2bLzaOfd7rDRhxIQDU7huyWGdc7iL6bQj44coTMvychWrZeOeH1mAcNs
 kK2g==
X-Gm-Message-State: AOAM532drSnbZo0ZK+nSrJlOlGNrnKk3NCoGyoCRA5cg9PkTEhY6etEG
 9ES4DkMNMt2f/MoIZY4/JBCizbxnA1sh9e0NjvU=
X-Google-Smtp-Source: ABdhPJxB6HHT/5ImMllSc0zTZfHVWBnbRgSeGDZMjt3oYIs91G+NbmfdjWddwdbRz8ehmNVuwuUkbkVMdNfT8RI7UEg=
X-Received: by 2002:a05:6870:6590:b0:e2:a532:6916 with SMTP id
 fp16-20020a056870659000b000e2a5326916mr2300788oab.261.1649540749178; Sat, 09
 Apr 2022 14:45:49 -0700 (PDT)
MIME-Version: 1.0
References: <CANEZYrdHs+8cA9m4YQWQYtqnti1dCO9ADky=jdMtTEarUwkkzQ@HIDDEN>
 <87r177ysjh.fsf@HIDDEN>
In-Reply-To: <87r177ysjh.fsf@HIDDEN>
From: Gulshan Singh <gsingh2011@HIDDEN>
Date: Sat, 9 Apr 2022 14:45:38 -0700
Message-ID: <CANEZYrfCok3x+GoPaZu-_gFO9iEDJdqjXUTFpsNkSL4BCD0sVw@HIDDEN>
Subject: Re: bug#54346: persist-save doesn't persist variables when the value
 is set to the default
To: Lars Ingebrigtsen <larsi@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.2 (/)
X-Debbugs-Envelope-To: 54346
Cc: Phillip Lord <phillip.lord@HIDDEN>, 54346 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.8 (/)

If either of these solutions make sense, or if Phillip has any other
suggestions, I'd be happy to make the fix myself if that would be
easier.

On Sat, Mar 12, 2022 at 9:44 AM Lars Ingebrigtsen <larsi@HIDDEN> wrote:
>
> Gulshan Singh <gsingh2011@HIDDEN> writes:
>
> > One fix could be to remove the check to see if the value is set to the
> > default. Another could be that if the value is set to the default,
> > remove the persist file.
>
> I've added Phillip to the CCs, perhaps he has some comments.
>
> --
> (domestic pets only, the antidote for overdose, milk.)
>    bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#54346; Package emacs. Full text available.

Message received at 54346 <at> debbugs.gnu.org:


Received: (at 54346) by debbugs.gnu.org; 12 Mar 2022 17:44:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 12 12:44:50 2022
Received: from localhost ([127.0.0.1]:40763 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nT5nO-0001pg-42
	for submit <at> debbugs.gnu.org; Sat, 12 Mar 2022 12:44:50 -0500
Received: from quimby.gnus.org ([95.216.78.240]:51408)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1nT5nM-0001pU-EH
 for 54346 <at> debbugs.gnu.org; Sat, 12 Mar 2022 12:44:48 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=te7HvyGjEwDTd9Y2SGdWKDglpt3ZFpXRVAByNiQ9QO0=; b=XT2n9t5GFgId7T8zPjsVvyzOAl
 A1c6AYxnjV2PUirRIMIUgvjWDiE5+L7PSwHNT7anKjYN2FBbWfy56xsjhiqgSSDIyLA8gZObWsZel
 74EqVCDvTkiOSa569g2CAtRJ1E8GBak4V5sLwEbqWdpkC6v3mELpFTAsbR+h9mMKu8ak=;
Received: from [84.212.220.105] (helo=xo)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1nT5nC-0001rd-3d; Sat, 12 Mar 2022 18:44:40 +0100
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Gulshan Singh <gsingh2011@HIDDEN>
Subject: Re: bug#54346: persist-save doesn't persist variables when the
 value is set to the default
References: <CANEZYrdHs+8cA9m4YQWQYtqnti1dCO9ADky=jdMtTEarUwkkzQ@HIDDEN>
Date: Sat, 12 Mar 2022 18:44:34 +0100
In-Reply-To: <CANEZYrdHs+8cA9m4YQWQYtqnti1dCO9ADky=jdMtTEarUwkkzQ@HIDDEN>
 (Gulshan Singh's message of "Fri, 11 Mar 2022 17:15:53 -0800")
Message-ID: <87r177ysjh.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Gulshan Singh <gsingh2011@HIDDEN> writes: > One fix could
 be to remove the check to see if the value is set to the > default. Another
 could be that if the value is set to the default, > remove the persist file.
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 54346
Cc: Phillip Lord <phillip.lord@HIDDEN>, 54346 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Gulshan Singh <gsingh2011@HIDDEN> writes:

> One fix could be to remove the check to see if the value is set to the
> default. Another could be that if the value is set to the default,
> remove the persist file.

I've added Phillip to the CCs, perhaps he has some comments.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#54346; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 12 Mar 2022 01:16:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 11 20:16:11 2022
Received: from localhost ([127.0.0.1]:38855 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nSqMd-0003Pn-2Q
	for submit <at> debbugs.gnu.org; Fri, 11 Mar 2022 20:16:11 -0500
Received: from lists.gnu.org ([209.51.188.17]:47140)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gsingh2011@HIDDEN>) id 1nSqMb-0003Pg-Bt
 for submit <at> debbugs.gnu.org; Fri, 11 Mar 2022 20:16:09 -0500
Received: from eggs.gnu.org ([209.51.188.92]:37638)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <gsingh2011@HIDDEN>)
 id 1nSqMb-00080E-7r
 for bug-gnu-emacs@HIDDEN; Fri, 11 Mar 2022 20:16:09 -0500
Received: from [2a00:1450:4864:20::52c] (port=39880
 helo=mail-ed1-x52c.google.com)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <gsingh2011@HIDDEN>)
 id 1nSqMZ-0007aV-2b
 for bug-gnu-emacs@HIDDEN; Fri, 11 Mar 2022 20:16:08 -0500
Received: by mail-ed1-x52c.google.com with SMTP id g20so12898912edw.6
 for <bug-gnu-emacs@HIDDEN>; Fri, 11 Mar 2022 17:16:06 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=mime-version:from:date:message-id:subject:to;
 bh=3vc4zow5ouRIkK+34pDeFXV49ZrhEwguifj5ZC0tQ5M=;
 b=PjfgQctlLaTySjat8cYCXpEDCwOu1LqrLeEE2uI62NU3UedZvdytzVBc9XBFVqOVur
 IGJGeLLUb2ZQQFw8DRHzu9YCuiJ2Tn5/f2SKgzzkrlJagJhkOiDYnNn+r7wzNUeFLhH9
 tJ7RvpGKXlcEkLnEXTdbVXLs9SwjcDH89pmdjXlKB103aa3iW2JpBFhTGEbgdeevB4OR
 93fLZPFSWrdGUNLKP4UVyO8/c+JQr/lw/+z4moLMUSvFvFSRdoLRAhD4kFet4bbVPwwV
 G8ueEOuh8pCjPeb8kByzA9rQDGylLtR+kN6uHwxLzxPUMlwqt7Go3jZjK4GUBFi8V/iW
 AvZw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
 bh=3vc4zow5ouRIkK+34pDeFXV49ZrhEwguifj5ZC0tQ5M=;
 b=qRwwUKWhOcn5njgFgIxntdG6bhjrSd++EDBhIFgrRn2pixgeNbXSco+6mhNNXWUiZm
 qF4549qWn1pBhUnP4OwZdPZCMtSNloecG2LWdQ82+mAmwmpoHEVviJny7QIKr6CjgehK
 fSDEbEqkH3viVKLa+gfeF5B2Y6O4MFTXBjk35CZKlEhxtZLqYqvSeUOxUxfzWi2gOwsX
 Mc2vyhzwJBJZIdivFoVGhU2XiUHRGCyOVZ8snQE+a4n9O79Thp5r2Qq8fD5JpcK14ew1
 9t0BAqWUbjuBauBPZy1PpH9TyNvE0RZVa72jThSwjeGxkVEtf4eYrXQ+G5UKeRSLIbdd
 vpWA==
X-Gm-Message-State: AOAM532VKkaRHrFsSVIImPxo4767eNpXEnaeuB2gXnbA51xu+5WpyqUz
 j3vtBIPX3MsU+mZtZILrUSHAhbFA6WkIZ64ckoVuly/2XRA=
X-Google-Smtp-Source: ABdhPJxnUpSTBHAED65rhRMVUDI0yF9+mUugy9vRWEuYTsXPI2QFQ5RA2XaI7wVhYad1rmeoSOy5sbWmcy/VO+BYIgA=
X-Received: by 2002:aa7:d1c8:0:b0:415:c61a:8ec8 with SMTP id
 g8-20020aa7d1c8000000b00415c61a8ec8mr11302025edp.390.1647047764930; Fri, 11
 Mar 2022 17:16:04 -0800 (PST)
MIME-Version: 1.0
From: Gulshan Singh <gsingh2011@HIDDEN>
Date: Fri, 11 Mar 2022 17:15:53 -0800
Message-ID: <CANEZYrdHs+8cA9m4YQWQYtqnti1dCO9ADky=jdMtTEarUwkkzQ@HIDDEN>
Subject: persist-save doesn't persist variables when the value is set to the
 default
To: bug-gnu-emacs@HIDDEN
Content-Type: multipart/alternative; boundary="000000000000f4f3c805d9fb3045"
X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::52c
 (failed)
Received-SPF: pass client-ip=2a00:1450:4864:20::52c;
 envelope-from=gsingh2011@HIDDEN; helo=mail-ed1-x52c.google.com
X-Spam_score_int: -3
X-Spam_score: -0.4
X-Spam_bar: /
X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001,
 PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
 T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.1 (--)

--000000000000f4f3c805d9fb3045
Content-Type: text/plain; charset="UTF-8"

Calling (persist-save 'myvar) should persist the value of myvar to a
file. However, it doesn't do this if the value of myvar is the same as
the default value. See lines 135 and 136 of persist.el:
https://git.savannah.gnu.org/cgit/emacs/elpa.git/tree/persist.el?h=externals/persist&id=2a2f83b4d63734ed48603008c813cfacd9e99404#n135

The intention here could have been that there's no need to persist the
variable if the user doesn't change it from the default. But it leads
to a bug in the following case:

(require 'persist)
(persist-defvar myvar nil "docstring") ; #1
(persist-save 'myvar) ; #2
(setq myvar "foo")
(persist-save 'myvar) ; #3
(setq myvar nil)
(persist-save 'myvar) ; #4

At #1, the value of myvar is not persisted, which is fine. If myvar
was persisted in the past, that value would be loaded, otherwise (like
in my case), it will be set to nil.

At #2, explicitly calling persist-save does not persist myvar. This is
unexpected, but still not a bug: the in-memory value of myvar (nil) is
still equal to the default, and it is not persisted, so the next time
the code runs the default will be loaded again.

At #3, myvar is persisted. The value is now "foo", which is different
from the default value of "nil".

#4 is where the bug happens. The persisted value of myvar is "foo",
but the in-memory value of myvar is nil. We *should* persist the new
value here, so that on the next load of the symbol we get the latest
value. However, because the current in-memory value is equal to the
default value (nil), it's not persisted. The next time this code runs,
it will load "foo" as the value of myvar instead of nil.

One fix could be to remove the check to see if the value is set to the
default. Another could be that if the value is set to the default,
remove the persist file.

System information from report-emacs-bug:

In GNU Emacs 27.2 (build 1, x86_64-apple-darwin18.7.0, NS appkit-1671.60
Version 10.14.6 (Build 18G95))
 of 2021-11-18 built on builder10-14.lan
Windowing system distributor 'Apple', version 10.3.2113
System Description:  macOS 12.2.1

Configured using:
 'configure --with-ns '--enable-locallisppath=/Library/Application
 Support/Emacs/${version}/site-lisp:/Library/Application
 Support/Emacs/site-lisp' --with-modules'

Configured features:
NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES
THREADS JSON PDUMPER GMP

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
format-spec rfc822 mml mml-sec password-cache epa derived epg epg-config
gnus-util rmail rmail-loaddefs text-property-search seq byte-opt gv
bytecomp byte-compile cconv mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils persist ispell help-fns
radix-tree cl-print debug backtrace help-mode easymenu find-func
time-date subr-x cl-loaddefs cl-lib tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel term/ns-win ns-win
ucs-normalize mule-util term/common-win tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode
lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch
timer select scroll-bar mouse jit-lock font-lock syntax facemenu
font-core term/tty-colors frame minibuffer cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote threads kqueue cocoa ns
multi-tty make-network-process emacs)

Memory information:
((conses 16 52205 6991)
 (symbols 48 6523 1)
 (strings 32 17870 1009)
 (string-bytes 1 596696)
 (vectors 16 10502)
 (vector-slots 8 132509 11576)
 (floats 8 27 44)
 (intervals 56 378 4)
 (buffers 1000 13))

--000000000000f4f3c805d9fb3045
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Calling (persist-save &#39;myvar) should persist the value=
 of myvar to a<br>file. However, it doesn&#39;t do this if the value of myv=
ar is the same as<br>the default value. See lines 135 and 136 of persist.el=
:<br><a href=3D"https://git.savannah.gnu.org/cgit/emacs/elpa.git/tree/persi=
st.el?h=3Dexternals/persist&amp;id=3D2a2f83b4d63734ed48603008c813cfacd9e994=
04#n135" rel=3D"noreferrer" target=3D"_blank">https://git.savannah.gnu.org/=
cgit/emacs/elpa.git/tree/persist.el?h=3Dexternals/persist&amp;id=3D2a2f83b4=
d63734ed48603008c813cfacd9e99404#n135</a><br><br>The intention here could h=
ave been that there&#39;s no need to persist the<br>variable if the user do=
esn&#39;t change it from the default. But it leads<br>to a bug in the follo=
wing case:<br><br>(require &#39;persist)<br>(persist-defvar myvar nil &quot=
;docstring&quot;) ; #1<br>(persist-save &#39;myvar) ; #2<br>(setq myvar &qu=
ot;foo&quot;)<br>(persist-save &#39;myvar) ; #3<br>(setq myvar nil)<br>(per=
sist-save &#39;myvar) ; #4<br><br>At #1, the value of myvar is not persiste=
d, which is fine. If myvar<br>was persisted in the past, that value would b=
e loaded, otherwise (like<br>in my case), it will be set to nil.<br><br>At =
#2, explicitly calling persist-save does not persist myvar. This is<br>unex=
pected, but still not a bug: the in-memory value of myvar (nil) is<br>still=
 equal to the default, and it is not persisted, so the next time<br>the cod=
e runs the default will be loaded again.<br><br>At #3, myvar is persisted. =
The value is now &quot;foo&quot;, which is different<br>from the default va=
lue of &quot;nil&quot;.<br><br>#4 is where the bug happens. The persisted v=
alue of myvar is &quot;foo&quot;,<br>but the in-memory value of myvar is ni=
l. We *should* persist the new<br>value here, so that on the next load of t=
he symbol we get the latest<br>value. However, because the current in-memor=
y value is equal to the<br>default value (nil), it&#39;s not persisted. The=
 next time this code runs,<br>it will load &quot;foo&quot; as the value of =
myvar instead of nil.<br><br>One fix could be to remove the check to see if=
 the value is set to the<br>default. Another could be that if the value is =
set to the default,<br>remove the persist file.<br><div><br></div><div>Syst=
em information from report-emacs-bug:<br><br>In GNU Emacs 27.2 (build 1, x8=
6_64-apple-darwin18.7.0, NS appkit-1671.60 Version 10.14.6 (Build 18G95))<b=
r>=C2=A0of 2021-11-18 built on builder10-14.lan<br>Windowing system distrib=
utor &#39;Apple&#39;, version 10.3.2113<br>System Description: =C2=A0macOS =
12.2.1<br><br>Configured using:<br>=C2=A0&#39;configure --with-ns &#39;--en=
able-locallisppath=3D/Library/Application<br>=C2=A0Support/Emacs/${version}=
/site-lisp:/Library/Application<br>=C2=A0Support/Emacs/site-lisp&#39; --wit=
h-modules&#39;<br><br>Configured features:<br>NOTIFY KQUEUE ACL GNUTLS LIBX=
ML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES<br>THREADS JSON PDUMPER GMP<br><br>=
Important settings:<br>=C2=A0 value of $LANG: en_US.UTF-8<br>=C2=A0 locale-=
coding-system: utf-8-unix<br><br>Major mode: Lisp Interaction<br><br>Minor =
modes in effect:<br>=C2=A0 tooltip-mode: t<br>=C2=A0 global-eldoc-mode: t<b=
r>=C2=A0 eldoc-mode: t<br>=C2=A0 electric-indent-mode: t<br>=C2=A0 mouse-wh=
eel-mode: t<br>=C2=A0 tool-bar-mode: t<br>=C2=A0 menu-bar-mode: t<br>=C2=A0=
 file-name-shadow-mode: t<br>=C2=A0 global-font-lock-mode: t<br>=C2=A0 font=
-lock-mode: t<br>=C2=A0 blink-cursor-mode: t<br>=C2=A0 auto-composition-mod=
e: t<br>=C2=A0 auto-encryption-mode: t<br>=C2=A0 auto-compression-mode: t<b=
r>=C2=A0 line-number-mode: t<br>=C2=A0 transient-mark-mode: t<br><br>Load-p=
ath shadows:<br>None found.<br><br>Features:<br>(shadow sort mail-extr emac=
sbug message rmc puny dired dired-loaddefs<br>format-spec rfc822 mml mml-se=
c password-cache epa derived epg epg-config<br>gnus-util rmail rmail-loadde=
fs text-property-search seq byte-opt gv<br>bytecomp byte-compile cconv mm-d=
ecode mm-bodies mm-encode mail-parse<br>rfc2231 mailabbrev gmm-utils mailhe=
ader sendmail rfc2047 rfc2045<br>ietf-drums mm-util mail-prsvr mail-utils p=
ersist ispell help-fns<br>radix-tree cl-print debug backtrace help-mode eas=
ymenu find-func<br>time-date subr-x cl-loaddefs cl-lib tooltip eldoc electr=
ic uniquify<br>ediff-hook vc-hooks lisp-float-type mwheel term/ns-win ns-wi=
n<br>ucs-normalize mule-util term/common-win tool-bar dnd fontset image<br>=
regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode<br=
>lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch<br>=
timer select scroll-bar mouse jit-lock font-lock syntax facemenu<br>font-co=
re term/tty-colors frame minibuffer cl-generic cham georgian<br>utf-8-lang =
misc-lang vietnamese tibetan thai tai-viet lao korean<br>japanese eucjp-ms =
cp51932 hebrew greek romanian slovak czech european<br>ethiopic indian cyri=
llic chinese composite charscript charprop<br>case-table epa-hook jka-cmpr-=
hook help simple abbrev obarray<br>cl-preloaded nadvice loaddefs button fac=
es cus-face macroexp files<br>text-properties overlay sha1 md5 base64 forma=
t env code-pages mule<br>custom widget hashtable-print-readable backquote t=
hreads kqueue cocoa ns<br>multi-tty make-network-process emacs)<br><br>Memo=
ry information:<br>((conses 16 52205 6991)<br>=C2=A0(symbols 48 6523 1)<br>=
=C2=A0(strings 32 17870 1009)<br>=C2=A0(string-bytes 1 596696)<br>=C2=A0(ve=
ctors 16 10502)<br>=C2=A0(vector-slots 8 132509 11576)<br>=C2=A0(floats 8 2=
7 44)<br>=C2=A0(intervals 56 378 4)<br>=C2=A0(buffers 1000 13))</div></div>

--000000000000f4f3c805d9fb3045--




Acknowledgement sent to Gulshan Singh <gsingh2011@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#54346; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 11 Apr 2022 10:30:02 UTC

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