GNU bug report logs - #75730
31.0.50; describe-symbol causing saveplace.el's defuns to evaluate

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: Jordan Ellis Coppard <jc+o.emacs@HIDDEN>; dated Tue, 21 Jan 2025 15:46:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

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


Received: (at 75730) by debbugs.gnu.org; 3 Feb 2025 12:14:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 03 07:14:20 2025
Received: from localhost ([127.0.0.1]:38152 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tevLI-00035v-50
	for submit <at> debbugs.gnu.org; Mon, 03 Feb 2025 07:14:20 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:56686)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1tevLF-00035g-QX
 for 75730 <at> debbugs.gnu.org; Mon, 03 Feb 2025 07:14:18 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1tevL9-0002iH-FY; Mon, 03 Feb 2025 07:14:11 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=Ahps5Ym33Mkp/NqgbjpDxFBxgBsF1nc1JBhaJym+7gg=; b=hioZ4KSEgQlX
 KZ4rsMHkjhhZeTZ6LoXl5e/XkjtSmQPtFGjjXL8ud24E5Js23u9PVCfH+0nQ821b68OtPnC5B0rlZ
 lFCYu6Oi3DPRYeMmn82nCJkdv7tdBoWqliebaVzO2nq0czf7aJdyIRDR1vMOYt1J9pSPQjiSzf+yO
 R3AP4suWbUf/ySNNfTzhTusu5weSE3bm875ttqCyMd2qm0Kf4wwBK+nCl1VygJlamskUlQ24QoPpX
 7obh+IQJ5qrnmWfxEa4TiAApg2bhyfwb5Rl+ohIvY7AqkyFyEXsgnjQB/iMiATapHUtK8VLRlfgxt
 irz4kaBTXXgMmowGdMb28A==;
Date: Mon, 03 Feb 2025 14:14:07 +0200
Message-Id: <864j1bcjjk.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
In-Reply-To: <jwv4j1clydh.fsf-monnier+emacs@HIDDEN> (message from Stefan
 Monnier on Sun, 02 Feb 2025 18:30:04 -0500)
Subject: Re: bug#75730: 31.0.50; describe-symbol causing saveplace.el's
 defuns to evaluate
References: <90d148f8-f31d-492b-b4e9-ecc05c3b572b@HIDDEN>
 <86o6zvuqd4.fsf@HIDDEN> <jwvplkb9jrn.fsf-monnier+emacs@HIDDEN>
 <865xlthpxf.fsf@HIDDEN> <jwv5xltnakm.fsf-monnier+emacs@HIDDEN>
 <865xltg7bo.fsf@HIDDEN> <jwv4j1clydh.fsf-monnier+emacs@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 75730
Cc: 75730 <at> debbugs.gnu.org, jc+o.emacs@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 (---)

> From: Stefan Monnier <monnier@HIDDEN>
> Cc: jc+o.emacs@HIDDEN,  75730 <at> debbugs.gnu.org
> Date: Sun, 02 Feb 2025 18:30:04 -0500
> 
> >> Not sure.  I was thinking of something like the patch below instead.
> >
> > Your patch mixes real changes with many stylistic changes, so it's
> > hard for me to understand the important differences between the two
> > approaches.  Can you explain in plain English the idea behind your
> > proposal and how it differs from mine?
> 
> Just delay the normalization to the moment that the alist needs to
> be read (whereas currently we read the alist as soon as we know how to
> normalize it).

OK, then I have no objections to installing your changes, thanks.




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

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


Received: (at 75730) by debbugs.gnu.org; 2 Feb 2025 23:30:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 02 18:30:14 2025
Received: from localhost ([127.0.0.1]:36714 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tejPp-0005QD-VH
	for submit <at> debbugs.gnu.org; Sun, 02 Feb 2025 18:30:14 -0500
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:35851)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <monnier@HIDDEN>)
 id 1tejPo-00053l-2G
 for 75730 <at> debbugs.gnu.org; Sun, 02 Feb 2025 18:30:12 -0500
Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 7088D8091C;
 Sun,  2 Feb 2025 18:30:06 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1738539005;
 bh=M32N/gRE8HHRlov9mCOWNcxXjhMwSYwXdU09N7o44ew=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=Z65DQw82j+RQ8GN+nEdNEv0U8KxGE9DFDKopDKj5t4f63gvHI8/LsD7pHtDnr71Mf
 +mt84EdOfpD61VnXaTaSKX/yQXAonlPMCbg3PeeO/fAI1luhXy7Z3f6aPuWmoxCgQ3
 ND6GLCT31KUnAi+dJSnBsJyQ99s4+LAnHS7vpC0qoZ9N7iqhuUzMigANOkhJKONTo7
 qrCyE7fx84D0qOCzKf9gBPCx7v+2jnUuk/mn8hx4B7qK/hneU80aaD2qCH1nDCPECw
 oCMiDAdodISBFQzdBp+rAI8Ya97to+up/oSgz1weZCyonXDhwGc6eWzs0b7mrZ+KWX
 NtTG3MHljqgVA==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 9888180372;
 Sun,  2 Feb 2025 18:30:05 -0500 (EST)
Received: from alfajor (104-195-232-86.cpe.teksavvy.com [104.195.232.86])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 5B124120775;
 Sun,  2 Feb 2025 18:30:05 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#75730: 31.0.50; describe-symbol causing saveplace.el's
 defuns to evaluate
In-Reply-To: <865xltg7bo.fsf@HIDDEN> (Eli Zaretskii's message of "Sat, 01 Feb
 2025 14:47:39 +0200")
Message-ID: <jwv4j1clydh.fsf-monnier+emacs@HIDDEN>
References: <90d148f8-f31d-492b-b4e9-ecc05c3b572b@HIDDEN>
 <86o6zvuqd4.fsf@HIDDEN> <jwvplkb9jrn.fsf-monnier+emacs@HIDDEN>
 <865xlthpxf.fsf@HIDDEN> <jwv5xltnakm.fsf-monnier+emacs@HIDDEN>
 <865xltg7bo.fsf@HIDDEN>
Date: Sun, 02 Feb 2025 18:30:04 -0500
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.035 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 75730
Cc: 75730 <at> debbugs.gnu.org, jc+o.emacs@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 (---)

>> Not sure.  I was thinking of something like the patch below instead.
>
> Your patch mixes real changes with many stylistic changes, so it's
> hard for me to understand the important differences between the two
> approaches.  Can you explain in plain English the idea behind your
> proposal and how it differs from mine?

Just delay the normalization to the moment that the alist needs to
be read (whereas currently we read the alist as soon as we know how to
normalize it).


        Stefan





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

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


Received: (at 75730) by debbugs.gnu.org; 1 Feb 2025 12:47:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 01 07:47:54 2025
Received: from localhost ([127.0.0.1]:56943 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1teCug-0002hl-5d
	for submit <at> debbugs.gnu.org; Sat, 01 Feb 2025 07:47:54 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:37660)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1teCuc-0002hO-Vm
 for 75730 <at> debbugs.gnu.org; Sat, 01 Feb 2025 07:47:52 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1teCuV-0005W8-MX; Sat, 01 Feb 2025 07:47:44 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=6SPBUpRIs+x4wGV6h/OshOxk5rP/adbQEzH+OWqwUTo=; b=l07yglXUMYJn
 xWONcoKPGgdN2SLEHffo3mjDoaSEQadaldv0UNm93cKxHVqNmFmZVwvmGPGCRTIyWOWJXE+zCzjMN
 0fMBzbTevRtxOEpbgoH59aVcQ2gM34chVysluOn0pq8+YxwUqBiUgZiNN8Jz0RDCamRrjIE5BbmJV
 GnvD8IPJt938oFJ2tPH6IGZu4G/d1amltCLccQrBjjz7Qs3kkDPrTbmCwB9nPRU7Z7DjOaL6Wow3a
 AiuM1jMx+LPqq18ofNf2iKOB4Ia3XHIIKU56bfX2MRjbE+/n0dQ+XlaPqdKbH5Dss1ypM5S8y1bg+
 VAqxqxgvMVIgl5M7KfdCBg==;
Date: Sat, 01 Feb 2025 14:47:39 +0200
Message-Id: <865xltg7bo.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
In-Reply-To: <jwv5xltnakm.fsf-monnier+emacs@HIDDEN> (message from Stefan
 Monnier on Sat, 01 Feb 2025 07:11:23 -0500)
Subject: Re: bug#75730: 31.0.50; describe-symbol causing saveplace.el's
 defuns to evaluate
References: <90d148f8-f31d-492b-b4e9-ecc05c3b572b@HIDDEN>
 <86o6zvuqd4.fsf@HIDDEN> <jwvplkb9jrn.fsf-monnier+emacs@HIDDEN>
 <865xlthpxf.fsf@HIDDEN> <jwv5xltnakm.fsf-monnier+emacs@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 75730
Cc: 75730 <at> debbugs.gnu.org, jc+o.emacs@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 (---)

> From: Stefan Monnier <monnier@HIDDEN>
> Cc: jc+o.emacs@HIDDEN,  75730 <at> debbugs.gnu.org
> Date: Sat, 01 Feb 2025 07:11:23 -0500
> 
> >> Nothing specific, no, but I think here the setter just shouldn't call
> >> `save-place-load-alist-from-file` when `save-place-loaded` is nil.
> >
> > Like below?
> > Jordan, can you see if the below patch solves your problem?
> >
> > diff --git a/lisp/saveplace.el b/lisp/saveplace.el
> > index c2e68f3..984b1c6 100644
> > --- a/lisp/saveplace.el
> > +++ b/lisp/saveplace.el
> > @@ -155,7 +155,9 @@ save-place-abbreviate-file-names
> >    :type 'boolean
> >    :set (lambda (sym val)
> >           (set-default sym val)
> > -         (or save-place-loaded (save-place-load-alist-from-file))
> > +         (or save-place-loaded
> > +             (and save-place-mode
> > +                  (save-place-load-alist-from-file)))
> >           (let ((fun (if val #'abbreviate-file-name #'expand-file-name))
> >                 ;; Don't expand file names for non-existing remote connections.
> >                 (non-essential t))
> 
> Not sure.  I was thinking of something like the patch below instead.

Your patch mixes real changes with many stylistic changes, so it's
hard for me to understand the important differences between the two
approaches.  Can you explain in plain English the idea behind your
proposal and how it differs from mine?

Thanks.




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

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


Received: (at 75730) by debbugs.gnu.org; 1 Feb 2025 12:11:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 01 07:11:36 2025
Received: from localhost ([127.0.0.1]:56869 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1teCLX-0006Q2-Jz
	for submit <at> debbugs.gnu.org; Sat, 01 Feb 2025 07:11:36 -0500
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:36956)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <monnier@HIDDEN>)
 id 1teCLU-0006Po-Vv
 for 75730 <at> debbugs.gnu.org; Sat, 01 Feb 2025 07:11:33 -0500
Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 41EF61009BE;
 Sat,  1 Feb 2025 07:11:26 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1738411885;
 bh=I7WD8Lumw+WWflVlVm9yayeaWsxTNvZOwBuDkf41t5g=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=hMXyW97Buzf7VP44mOA/B90VKSB7oy6GZ2n5w4HzpsymsV4tuLLcSpdolkAsP7oXR
 xHtvCjUUcpe3/zXLEm4houGRe90iNqXH7BoJ6ZHYLLrzXmf5l9x697lQbXGWBMzMDv
 tOFLdFPZ9dDcYs80Sxk/AI9O3pEfDugziP393w+CqBvGVA62yynelA4KVoQEYG8ib0
 6S/WqvWr6vEM312/TbSO1tAcwChmB08Y29LKfTr5mQrOEuUPfJ0pAFGWdjCu4OR6cd
 6eF6iXKhv18zbaHGBwVBY/63OK/YAML4txe2dGKvtE1oCH2S5IQZ8pqyflhM9qppeT
 XEJ+xsiHF7vAQ==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 6B4B1100180;
 Sat,  1 Feb 2025 07:11:25 -0500 (EST)
Received: from asado (unknown [85.184.94.141])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id C4C03120478;
 Sat,  1 Feb 2025 07:11:24 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#75730: 31.0.50; describe-symbol causing saveplace.el's
 defuns to evaluate
In-Reply-To: <865xlthpxf.fsf@HIDDEN> (Eli Zaretskii's message of "Sat, 01 Feb
 2025 13:20:28 +0200")
Message-ID: <jwv5xltnakm.fsf-monnier+emacs@HIDDEN>
References: <90d148f8-f31d-492b-b4e9-ecc05c3b572b@HIDDEN>
 <86o6zvuqd4.fsf@HIDDEN> <jwvplkb9jrn.fsf-monnier+emacs@HIDDEN>
 <865xlthpxf.fsf@HIDDEN>
Date: Sat, 01 Feb 2025 07:11:23 -0500
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL 0.236 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 75730
Cc: 75730 <at> debbugs.gnu.org, jc+o.emacs@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 (---)

--=-=-=
Content-Type: text/plain

>> Nothing specific, no, but I think here the setter just shouldn't call
>> `save-place-load-alist-from-file` when `save-place-loaded` is nil.
>
> Like below?
> Jordan, can you see if the below patch solves your problem?
>
> diff --git a/lisp/saveplace.el b/lisp/saveplace.el
> index c2e68f3..984b1c6 100644
> --- a/lisp/saveplace.el
> +++ b/lisp/saveplace.el
> @@ -155,7 +155,9 @@ save-place-abbreviate-file-names
>    :type 'boolean
>    :set (lambda (sym val)
>           (set-default sym val)
> -         (or save-place-loaded (save-place-load-alist-from-file))
> +         (or save-place-loaded
> +             (and save-place-mode
> +                  (save-place-load-alist-from-file)))
>           (let ((fun (if val #'abbreviate-file-name #'expand-file-name))
>                 ;; Don't expand file names for non-existing remote connections.
>                 (non-essential t))

Not sure.  I was thinking of something like the patch below instead.

    
        Stefan

--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline; filename=saveplace.patch

diff --git a/lisp/saveplace.el b/lisp/saveplace.el
index c2e68f39730..b886b9d1891 100644
--- a/lisp/saveplace.el
+++ b/lisp/saveplace.el
@@ -101,16 +101,16 @@
   :type 'boolean)
 
 (defun save-place-load-alist-from-file ()
-  (if (not save-place-loaded)
-      (progn
+  (unless save-place-loaded
         (setq save-place-loaded t)
+    ;; FIXME: Obey `save-place-abbreviate-file-names'?
         (let ((file (expand-file-name save-place-file)))
           ;; make sure that the alist does not get overwritten, and then
           ;; load it if it exists:
-          (if (file-readable-p file)
+      (when (file-readable-p file)
               ;; don't want to use find-file because we have been
               ;; adding hooks to it.
-              (with-current-buffer (get-buffer-create " *Saved Places*")
+        (with-temp-buffer
                 (delete-region (point-min) (point-max))
                 ;; Make sure our 'coding:' cookie in the save-place
                 ;; file will take effect, in case the caller binds
@@ -138,10 +138,8 @@
                           (if (>= count save-place-limit)
                               (setcdr s nil)
                             (setq count (1+ count)))
-                          (setq s (cdr s))))))
-
-                (kill-buffer (current-buffer))))
-          nil))))
+                    (setq s (cdr s))))))))
+      (save-place--normalize-alist))))
 
 (defcustom save-place-abbreviate-file-names nil
   "If non-nil, abbreviate file names before saving them.
@@ -154,27 +152,31 @@ save-place-abbreviate-file-names
 either `setopt' or \\[customize-variable] to set this option."
   :type 'boolean
   :set (lambda (sym val)
-         (set-default sym val)
-         (or save-place-loaded (save-place-load-alist-from-file))
-         (let ((fun (if val #'abbreviate-file-name #'expand-file-name))
-               ;; Don't expand file names for non-existing remote connections.
-               (non-essential t))
-           (setq save-place-alist
-                 (cl-delete-duplicates
-                  (cl-loop for (k . v) in save-place-alist
-                           collect
-                           (cons (funcall fun k)
-                                 (if (listp v)
-                                     (cl-loop for (k1 . v1) in v
-                                              collect
-                                              (cons k1 (funcall fun v1)))
-                                   v)))
-                  :key #'car
-                  :from-end t
-                  :test #'equal)))
-         val)
+         (let ((old (if (default-boundp sym) (default-value sym))))
+           (set-default sym val)
+           (if (or (equal old val) (not save-place-loaded))
+               nil                      ;Nothing to do.
+             (save-place--normalize-alist))))
   :version "28.1")
 
+(defun save-place--normalize-alist ()
+  (let ((fun (if val #'abbreviate-file-name #'expand-file-name))
+        ;; Don't expand file names for non-existing remote connections.
+        (non-essential t))
+    (setq save-place-alist
+          (cl-delete-duplicates
+           (cl-loop for (k . v) in save-place-alist
+                    collect
+                    (cons (funcall fun k)
+                          (if (listp v)
+                              (cl-loop for (k1 . v1) in v
+                                       collect
+                                       (cons k1 (funcall fun v1)))
+                            v)))
+           :key #'car
+           :from-end t
+           :test #'equal))))
+
 (defcustom save-place-save-skipped t
   "If non-nil, remember files matching `save-place-skip-check-regexp'.
 
@@ -342,7 +344,7 @@ save-place-forget-unreadable-files
 (defun save-place-alist-to-file ()
   (let ((file (expand-file-name save-place-file))
         (coding-system-for-write 'utf-8))
-    (with-current-buffer (get-buffer-create " *Saved Places*")
+    (with-temp-buffer
       (delete-region (point-min) (point-max))
       (when save-place-forget-unreadable-files
 	(save-place-forget-unreadable-files))
@@ -361,8 +363,7 @@ save-place-alist-to-file
 	(condition-case nil
 	    ;; Don't use write-file; we don't want this buffer to visit it.
             (write-region (point-min) (point-max) file)
-	  (file-error (message "Saving places: can't write %s" file)))
-        (kill-buffer (current-buffer))))))
+	  (file-error (message "Saving places: can't write %s" file)))))))
 
 (defun save-places-to-alist ()
   ;; go through buffer-list, saving places to alist if save-place-mode

--=-=-=--





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

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


Received: (at 75730) by debbugs.gnu.org; 1 Feb 2025 11:20:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 01 06:20:44 2025
Received: from localhost ([127.0.0.1]:56640 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1teBYJ-0003qa-JF
	for submit <at> debbugs.gnu.org; Sat, 01 Feb 2025 06:20:43 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:39562)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1teBYG-0003qK-JW
 for 75730 <at> debbugs.gnu.org; Sat, 01 Feb 2025 06:20:41 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1teBY9-0002eG-VM; Sat, 01 Feb 2025 06:20:33 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=9NkAIzfzGWAIbXI96Ml4OC6t6c0jCwhdC0av0k5mY1o=; b=NsSWj9nOsPrw
 ToKqzINwhHohCEMM3K+qzjljFYpeWKA9wAyZ7WNAD9HrelUHhOHR6LrLpx53u7yJfHnWQ4d3Z1VdD
 0KCo/r8bulMqsRFj5Frrt5iGzYmBkceOmIrKDEEm9+4mxXUDhXXuDBJw4rHsd2RQ7yazt5ZJUVoJl
 TgfMpPokyzm+CjIiq2NiBc/EnoWQOSLtMzbJzevViqC1in9iSB2sOee1jk5NmTTEdg1XT2x2380qF
 hRXKba5x0rl1pGhb8rFBWOXhOzTrjzFJlVwNTJ7bUzPA6eL+8XUz5PC2+rwrStANBfkxv7v1gg6+e
 9rldRdlRuKqLg7DOEcWbmg==;
Date: Sat, 01 Feb 2025 13:20:28 +0200
Message-Id: <865xlthpxf.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
In-Reply-To: <jwvplkb9jrn.fsf-monnier+emacs@HIDDEN> (message from Stefan
 Monnier on Sat, 25 Jan 2025 07:12:12 -0500)
Subject: Re: bug#75730: 31.0.50; describe-symbol causing saveplace.el's
 defuns to evaluate
References: <90d148f8-f31d-492b-b4e9-ecc05c3b572b@HIDDEN>
 <86o6zvuqd4.fsf@HIDDEN> <jwvplkb9jrn.fsf-monnier+emacs@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 75730
Cc: 75730 <at> debbugs.gnu.org, jc+o.emacs@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 (---)

> From: Stefan Monnier <monnier@HIDDEN>
> Cc: Jordan Ellis Coppard <jc+o.emacs@HIDDEN>,  75730 <at> debbugs.gnu.org
> Date: Sat, 25 Jan 2025 07:12:12 -0500
> 
> > I don't see the minor mode being turned on by "C-h o".  What I do see
> > is that the :set function of save-place-abbreviate-file-names fills up
> > save-place-alist (and maybe does other things).
> >
> > Stefan, do we have features to avoid that?  Perhaps some value of
> > :initialize attribute could help?
> 
> Nothing specific, no, but I think here the setter just shouldn't call
> `save-place-load-alist-from-file` when `save-place-loaded` is nil.

Like below?

Jordan, can you see if the below patch solves your problem?

diff --git a/lisp/saveplace.el b/lisp/saveplace.el
index c2e68f3..984b1c6 100644
--- a/lisp/saveplace.el
+++ b/lisp/saveplace.el
@@ -155,7 +155,9 @@ save-place-abbreviate-file-names
   :type 'boolean
   :set (lambda (sym val)
          (set-default sym val)
-         (or save-place-loaded (save-place-load-alist-from-file))
+         (or save-place-loaded
+             (and save-place-mode
+                  (save-place-load-alist-from-file)))
          (let ((fun (if val #'abbreviate-file-name #'expand-file-name))
                ;; Don't expand file names for non-existing remote connections.
                (non-essential t))




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

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


Received: (at 75730) by debbugs.gnu.org; 25 Jan 2025 12:20:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 25 07:20:34 2025
Received: from localhost ([127.0.0.1]:48854 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tbf9O-0001Yr-1x
	for submit <at> debbugs.gnu.org; Sat, 25 Jan 2025 07:20:34 -0500
Received: from mail-vk1-xa2d.google.com ([2607:f8b0:4864:20::a2d]:50306)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <shipmints@HIDDEN>)
 id 1tbf9L-0001Yc-Oi
 for 75730 <at> debbugs.gnu.org; Sat, 25 Jan 2025 07:20:32 -0500
Received: by mail-vk1-xa2d.google.com with SMTP id
 71dfb90a1353d-5160f1870f3so911995e0c.0
 for <75730 <at> debbugs.gnu.org>; Sat, 25 Jan 2025 04:20:31 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1737807626; x=1738412426; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=nsrfFTadXvFSWydvBDrZ9sGgDYY4eVE6JSLbhcdNq1w=;
 b=TQ1kFC8LRvkQjLyWYA3UhLey2Nrfvz/CEvYuCaOgk8ZfDbuGIKarLqAdH8XBeJZmIY
 uRdbNgnqQV1T9FWTiLpRZ+/ZFad602TVIaoqwE1uHYKRdkIl4LAKd/Nl3PEtZwb4B6Xz
 pLvKVCvokzYEuym9aVRDK5LgmUGwcYBolUckv3oHcYCJ8OtUzOXUPTUnJw00clKvfeGO
 Ru42KMGFqaZnoO5g6QNpHZzsY+6F92qi5PJ+XaQ7vdGCypixxA4AgisR3DuxiqR4Gyzh
 8/Y0S3W8d272+G8UUo79MIObLH3kpMkViLQCj34UiK/yKQCgMIFPMeoPq3EteHeN9SBU
 5btQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1737807626; x=1738412426;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=nsrfFTadXvFSWydvBDrZ9sGgDYY4eVE6JSLbhcdNq1w=;
 b=eLwFAse35RJAclC2/MFTxmc+YdDik6/viapd96IkWwNXp4ljJLdI41S8n6ZC8ks/AJ
 TRz36vaCOcGd1c9ZmJHjM404dvX+ceKidaKUg/Grs5FRrXGf4xmhOop3zV729FF/Deil
 1zOOF85Z3KTnmNI6kmkd0y60Mf0CqtFjDIe2EnsNCPxyOhrf05BAJ/1KQjH3YkBDg359
 NUuxdCHYpuefCfpsd8RzyGU1gdNbX0VUE/+NUZG2e/kwG/O0LPAgkDPI0VX+gRqTGzN7
 MzpIGKarjAcPqtj6iDIUuM/pgrdx8FOQoBwksoaDukdnEGqBz2wE33IXEpVHkmtVhE7A
 qvkg==
X-Forwarded-Encrypted: i=1;
 AJvYcCVuy4q5qSZgVZrvj2DuXQgdip8yBMcG/D+GQuvDy6tdWE9FaMLwfm5C1NMs3Vlt9BOsAR9ftw==@debbugs.gnu.org
X-Gm-Message-State: AOJu0YzXPmkGqPho1y9IaGyxwW8M7t++Fv9ha03UZeW2R/Emrk8dilMd
 zAnlFq5oYaWkYMcAKvgQ9NFAOpeG+VDdLmcywIPu/P4WvQfoySBOLPJLGo+jTwmirEzD6E/tjn4
 SGD1bUcC5WrQ64xzc7Y64Zphyzi8=
X-Gm-Gg: ASbGncsYXmX6ISF/wdMsf6IvfQOHaVjfzRiy641ZRSfrjXAulTuOFWIYMbSTeWiJQ+Z
 YG20lelXi1b4kH3JTfttnZXY/HO3xalHpHVrZ70tCPQkklPXgPkbs6RywTDEb9Q==
X-Google-Smtp-Source: AGHT+IF75fgNz5TIPEDQIKzyrmU1fORBg+1dSesHgk5DtiH5OY1PhF5DAUB2bMzeGZY+T3LMSQhDGorE/BLjGMAjukY=
X-Received: by 2002:a05:6122:a1f:b0:515:3bfb:d421 with SMTP id
 71dfb90a1353d-51d5b2cdfbdmr27966911e0c.6.1737807626111; Sat, 25 Jan 2025
 04:20:26 -0800 (PST)
MIME-Version: 1.0
References: <90d148f8-f31d-492b-b4e9-ecc05c3b572b@HIDDEN>
 <86o6zvuqd4.fsf@HIDDEN> <jwvplkb9jrn.fsf-monnier+emacs@HIDDEN>
In-Reply-To: <jwvplkb9jrn.fsf-monnier+emacs@HIDDEN>
From: Ship Mints <shipmints@HIDDEN>
Date: Sat, 25 Jan 2025 07:18:41 -0500
X-Gm-Features: AWEUYZm0GC8Z_3mmjaXwMpDjswwqYpiieGWsX2qN-BgHWPRN96SLTKoc72YHqqg
Message-ID: <CAN+1HboOq34YEG1fdXAWAYP=UxNTUobpqm44GQa1ZAx7gNWvqg@HIDDEN>
Subject: Re: bug#75730: 31.0.50; describe-symbol causing saveplace.el's defuns
 to evaluate
To: Stefan Monnier <monnier@HIDDEN>
Content-Type: multipart/alternative; boundary="0000000000003e11f4062c86de89"
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 75730
Cc: Eli Zaretskii <eliz@HIDDEN>, 75730 <at> debbugs.gnu.org,
 Jordan Ellis Coppard <jc+o.emacs@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: -1.0 (-)

--0000000000003e11f4062c86de89
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Aha, I spoke to soon about Tramp. Looks like someone put in (non-essential
t) so that takes care of that.

In any case, it seems would be better would be to defer the translation
work rather than do it in the defcustom.

On Sat, Jan 25, 2025 at 7:13=E2=80=AFAM Stefan Monnier via Bug reports for =
GNU
Emacs, the Swiss army knife of text editors <bug-gnu-emacs@HIDDEN> wrote:

> > I don't see the minor mode being turned on by "C-h o".  What I do see
> > is that the :set function of save-place-abbreviate-file-names fills up
> > save-place-alist (and maybe does other things).
> >
> > Stefan, do we have features to avoid that?  Perhaps some value of
> > :initialize attribute could help?
>
> Nothing specific, no, but I think here the setter just shouldn't call
> `save-place-load-alist-from-file` when `save-place-loaded` is nil.
>
>
>         Stefan
>
>
>
>
>

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

<div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-family:monospac=
e"><div dir=3D"ltr" style=3D"font-family:Arial,Helvetica,sans-serif"><div c=
lass=3D"gmail_default" style=3D"font-family:monospace">Aha, I spoke to soon=
 about Tramp. Looks like someone put in=C2=A0(non-essential t) so that take=
s care of that.</div><div class=3D"gmail_default" style=3D"font-family:mono=
space"><br></div><div class=3D"gmail_default" style=3D"font-family:monospac=
e">In any case, it seems would be better would be to defer the translation =
work rather than do it in the defcustom.</div></div></div></div><br><div cl=
ass=3D"gmail_quote gmail_quote_container"><div dir=3D"ltr" class=3D"gmail_a=
ttr">On Sat, Jan 25, 2025 at 7:13=E2=80=AFAM Stefan Monnier via Bug reports=
 for GNU Emacs, the Swiss army knife of text editors &lt;<a href=3D"mailto:=
bug-gnu-emacs@HIDDEN">bug-gnu-emacs@HIDDEN</a>&gt; wrote:<br></div><block=
quote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1=
px solid rgb(204,204,204);padding-left:1ex">&gt; I don&#39;t see the minor =
mode being turned on by &quot;C-h o&quot;.=C2=A0 What I do see<br>
&gt; is that the :set function of save-place-abbreviate-file-names fills up=
<br>
&gt; save-place-alist (and maybe does other things).<br>
&gt;<br>
&gt; Stefan, do we have features to avoid that?=C2=A0 Perhaps some value of=
<br>
&gt; :initialize attribute could help?<br>
<br>
Nothing specific, no, but I think here the setter just shouldn&#39;t call<b=
r>
`save-place-load-alist-from-file` when `save-place-loaded` is nil.<br>
<br>
<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 Stefan<br>
<br>
<br>
<br>
<br>
</blockquote></div>

--0000000000003e11f4062c86de89--




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

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


Received: (at 75730) by debbugs.gnu.org; 25 Jan 2025 12:12:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 25 07:12:28 2025
Received: from localhost ([127.0.0.1]:48834 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tbf1Y-000177-BQ
	for submit <at> debbugs.gnu.org; Sat, 25 Jan 2025 07:12:28 -0500
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:48425)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <monnier@HIDDEN>)
 id 1tbf1T-00016p-NU
 for 75730 <at> debbugs.gnu.org; Sat, 25 Jan 2025 07:12:24 -0500
Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id A1A12440887;
 Sat, 25 Jan 2025 07:12:16 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1737807135;
 bh=rj+Td0zCHRzjxfoooZmMvwz5fpsFks/30weVuA/zr9E=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=mT7Gs08usz6SIihVuwxYxABOoj6o71ghjzzvxmuRxGAkco5l3rUMSijPCWsGSUjnn
 otIm2lpKrMvH8o6jNORAJs60ZzbTIv86tQcV6eHZMayj4aypQLCMFoU57DxohPn3YA
 NBIERKwZz2b6yBdLN8vzKB28mkFWSogR8HDqzZhERTHoSZItvHC9FU+LMXVtwrlqnl
 F6ENgKloSDOjppM7Kx8RvXHkb57yYwvuSS73bXz1Xf16bmYpNv3kw7O0myvEWPWDPP
 VgIlSHxZnUsciy1HFj01tITG1dCj87R9dcDI1uTUQHJ/aQSPyJDQFIE6dNidB2QjOV
 Kt7DQqJfOuM2w==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id B22B14407EF;
 Sat, 25 Jan 2025 07:12:15 -0500 (EST)
Received: from asado (dyn.144-85-147-102.dsl.vtx.ch [144.85.147.102])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id D0313120637;
 Sat, 25 Jan 2025 07:12:14 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#75730: 31.0.50; describe-symbol causing saveplace.el's
 defuns to evaluate
In-Reply-To: <86o6zvuqd4.fsf@HIDDEN> (Eli Zaretskii's message of "Sat, 25 Jan
 2025 12:42:15 +0200")
Message-ID: <jwvplkb9jrn.fsf-monnier+emacs@HIDDEN>
References: <90d148f8-f31d-492b-b4e9-ecc05c3b572b@HIDDEN>
 <86o6zvuqd4.fsf@HIDDEN>
Date: Sat, 25 Jan 2025 07:12:12 -0500
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL 0.126 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain T_SCC_BODY_TEXT_LINE    -0.01 -
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 75730
Cc: 75730 <at> debbugs.gnu.org, Jordan Ellis Coppard <jc+o.emacs@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 (---)

> I don't see the minor mode being turned on by "C-h o".  What I do see
> is that the :set function of save-place-abbreviate-file-names fills up
> save-place-alist (and maybe does other things).
>
> Stefan, do we have features to avoid that?  Perhaps some value of
> :initialize attribute could help?

Nothing specific, no, but I think here the setter just shouldn't call
`save-place-load-alist-from-file` when `save-place-loaded` is nil.


        Stefan





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

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


Received: (at 75730) by debbugs.gnu.org; 25 Jan 2025 12:12:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 25 07:12:16 2025
Received: from localhost ([127.0.0.1]:48830 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tbf1L-00016c-QI
	for submit <at> debbugs.gnu.org; Sat, 25 Jan 2025 07:12:16 -0500
Received: from mail-ua1-x929.google.com ([2607:f8b0:4864:20::929]:49534)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <shipmints@HIDDEN>)
 id 1tbf1I-00016M-Q3
 for 75730 <at> debbugs.gnu.org; Sat, 25 Jan 2025 07:12:14 -0500
Received: by mail-ua1-x929.google.com with SMTP id
 a1e0cc1a2514c-85c4c9349b3so752398241.3
 for <75730 <at> debbugs.gnu.org>; Sat, 25 Jan 2025 04:12:12 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1737807127; x=1738411927; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=aAv4i2xdk4i6lOFupTWPi4n9KDh0N+fju5b1banujeM=;
 b=Og8D2SqWvt+Nq7/kREJTbHZbC87xkKAL2xu6z7DDhG7yMfHhtjzkoo8xvfCibhf4sU
 RUn6C+rSYHjesQyaUzQjdYH8FeTzuCAgGERcboxZwp7kVCwIi8TpFkmPAgtQKB5IzSIO
 WqVvOexxiJ1QAafZugUloJ4WPl+7AUkR3rIbVlqsyB+fkdpoWPEV714cXtQutbUIuUg2
 457yQ1KYsljZBF5EfhbTenhDG5YgHWS47gYkgHBQ+7egT7xdeUttT71GYATs5fy1v7Pk
 Y39RmydFOurt9lYDlf+m/Qxb9VP2lUuWYgXqZzG79dMDV63TR1Ey3VkT1i6T/iULNbG6
 pSTw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1737807127; x=1738411927;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=aAv4i2xdk4i6lOFupTWPi4n9KDh0N+fju5b1banujeM=;
 b=jaQXagny4iZEN3Xb/YtbcRqJ2NjhxYJoPMSjv9IMxaLOlgGqPIlvEutWvQj5a8s+Ns
 n0fXzCssKKupwahZFTEKfhFV74+5J8XxLXxT+QTSPSvEkSpBe0CSBPDlUcc0N0yih9Sc
 +21i6H4/p+MaLLL1W28n2fVEeYfGDdA0HXMjc+erZun1SBbGMcCE8LzUreonEVOsbOK3
 j3EeC/iCFbIHv1AAcgeTivwn/SB+8KPMXR+ZVcwXjcfy0VXFEIRJATynowG5QDJ+rQ62
 JCxL381no2YS+CeR9rOFZLg22R6C3E+Bq6PjLTHfiV1JInKd/sfR2Rj4wYkes42h65Uu
 +g+A==
X-Forwarded-Encrypted: i=1;
 AJvYcCVa8Pz8zGjBL9wiwcWIaHPjZQnUzibqGyBsN7XmmV681m5U4E0FJZZqc0LThf1lPbHZaCqJmg==@debbugs.gnu.org
X-Gm-Message-State: AOJu0YxES2KCavNuZLEdfJiyWzm0kpVhg2doMtt/dWuYRTGd/dYHKSij
 zgDqT0/XlZ01k80leqUlDu61YXNWY5EmbSApVD7M7LVkvKWj/dAXgsXPGVFUnRmh5ltiAEDPwRS
 v2AnX7B1/pZHmM72xWXSFD88OZEg=
X-Gm-Gg: ASbGncs781vrGesBFriSA1b7ZHrWpEU1V35XqfbzB9G+qf5xEge0tK/3H1+/wXoYtvo
 YBu3V9I2hjs6erifllsiPYZXstEj8/Ov9R/YORbUmZsGBVRqfWnZTa3cNmJREpw==
X-Google-Smtp-Source: AGHT+IFw5ifpplq/n/IoKW50dDwfND+zn4r553Ph5euD88jSKkn8rX6s0g97HBhJqFDIJOqjQ68ahGUN2eWLq2SVr1E=
X-Received: by 2002:a05:6122:2389:b0:50d:a31c:678c with SMTP id
 71dfb90a1353d-51d51b65c8fmr30125794e0c.2.1737807127171; Sat, 25 Jan 2025
 04:12:07 -0800 (PST)
MIME-Version: 1.0
References: <90d148f8-f31d-492b-b4e9-ecc05c3b572b@HIDDEN>
 <86o6zvuqd4.fsf@HIDDEN>
In-Reply-To: <86o6zvuqd4.fsf@HIDDEN>
From: Ship Mints <shipmints@HIDDEN>
Date: Sat, 25 Jan 2025 07:10:23 -0500
X-Gm-Features: AWEUYZnF6amSCg0lN_xKNDrNv8DFY0_dEggkUgLsLSP9OYaLg0wadggF_7_dnx0
Message-ID: <CAN+1HbpANpvBG1rzeAKCXU=syar1qDRw+QfaT5n2LNvugwkdmw@HIDDEN>
Subject: Re: bug#75730: 31.0.50; describe-symbol causing saveplace.el's defuns
 to evaluate
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: multipart/alternative; boundary="00000000000080daa4062c86c018"
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 75730
Cc: 75730 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>,
 Jordan Ellis Coppard <jc+o.emacs@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: -1.0 (-)

--00000000000080daa4062c86c018
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Tramp connections could also be made during that process (and to hosts not
available at the time), via abbreviate-file-name's file name handler logic?
That could delay/hang people's Emacs startup sessions or when they run
customize.


On Sat, Jan 25, 2025 at 5:43=E2=80=AFAM Eli Zaretskii <eliz@HIDDEN> wrote:

> > Date: Wed, 22 Jan 2025 00:30:41 +0900
> > From:  Jordan Ellis Coppard via "Bug reports for GNU Emacs,
> >  the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN>
> >
> > While I was looking at how save-place-mode works I noticed that C-h o
> > save-place-mode RET (or any other symbol it defines) causes the actual
> > minor-mode logic for save-place-mode to evaluate. The result is it
> > parsed the places file, it populated save-place-alist and so forth.
> > Visiting the file directly via C-x C-f doesn't do this and the side
> > effects of doing so I think constitute a bug.
> >
> > A user probably didn't or doesn't want C-h o executing minor-mode BODY
> > functions when all they asked for is a description of the symbol. If
> > this must occur (as I understand it to gather a complete picture of
> > other symbols defined etc) it should definitely not clobber the users
> > state.
>
> I don't see the minor mode being turned on by "C-h o".  What I do see
> is that the :set function of save-place-abbreviate-file-names fills up
> save-place-alist (and maybe does other things).
>
> Stefan, do we have features to avoid that?  Perhaps some value of
> :initialize attribute could help?
>
>
>
>

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

<div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-family:monospac=
e">Tramp connections could also be made during that process (and to hosts n=
ot available at the time), via abbreviate-file-name&#39;s file name handler=
 logic? That could delay/hang people&#39;s Emacs startup sessions or when t=
hey run customize.</div><div class=3D"gmail_default" style=3D"font-family:m=
onospace"><br></div></div><br><div class=3D"gmail_quote gmail_quote_contain=
er"><div dir=3D"ltr" class=3D"gmail_attr">On Sat, Jan 25, 2025 at 5:43=E2=
=80=AFAM Eli Zaretskii &lt;<a href=3D"mailto:eliz@HIDDEN">eliz@HIDDEN</a>=
&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px =
0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">&gt;=
 Date: Wed, 22 Jan 2025 00:30:41 +0900<br>
&gt; From:=C2=A0 Jordan Ellis Coppard via &quot;Bug reports for GNU Emacs,<=
br>
&gt;=C2=A0 the Swiss army knife of text editors&quot; &lt;<a href=3D"mailto=
:bug-gnu-emacs@HIDDEN" target=3D"_blank">bug-gnu-emacs@HIDDEN</a>&gt;<br>
&gt; <br>
&gt; While I was looking at how save-place-mode works I noticed that C-h o<=
br>
&gt; save-place-mode RET (or any other symbol it defines) causes the actual=
<br>
&gt; minor-mode logic for save-place-mode to evaluate. The result is it<br>
&gt; parsed the places file, it populated save-place-alist and so forth.<br=
>
&gt; Visiting the file directly via C-x C-f doesn&#39;t do this and the sid=
e<br>
&gt; effects of doing so I think constitute a bug.<br>
&gt; <br>
&gt; A user probably didn&#39;t or doesn&#39;t want C-h o executing minor-m=
ode BODY<br>
&gt; functions when all they asked for is a description of the symbol. If<b=
r>
&gt; this must occur (as I understand it to gather a complete picture of<br=
>
&gt; other symbols defined etc) it should definitely not clobber the users<=
br>
&gt; state.<br>
<br>
I don&#39;t see the minor mode being turned on by &quot;C-h o&quot;.=C2=A0 =
What I do see<br>
is that the :set function of save-place-abbreviate-file-names fills up<br>
save-place-alist (and maybe does other things).<br>
<br>
Stefan, do we have features to avoid that?=C2=A0 Perhaps some value of<br>
:initialize attribute could help?<br>
<br>
<br>
<br>
</blockquote></div>

--00000000000080daa4062c86c018--




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

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


Received: (at 75730) by debbugs.gnu.org; 25 Jan 2025 10:42:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jan 25 05:42:26 2025
Received: from localhost ([127.0.0.1]:48684 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tbdcQ-0004vZ-Ap
	for submit <at> debbugs.gnu.org; Sat, 25 Jan 2025 05:42:26 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:57650)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1tbdcO-0004vK-A4
 for 75730 <at> debbugs.gnu.org; Sat, 25 Jan 2025 05:42:24 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1tbdcI-0000r9-1F; Sat, 25 Jan 2025 05:42:18 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=cxXsEJvIZFRxIAUrKo6V+Th5k2FzvE7zjBM0XepS8mI=; b=G7kyAqE9V+XF
 itmKTfH7xb14ehq2fOaR20XumIcu9NGcnHeIwqdmdVeSpeAksEMhXZqob9DhqQcJ9Z2qo8awZA1ew
 p+W3tnuSAmd3C7YMFs41MHi/f++P3ZRiHHWUhy6OACGVxMZUE25Idgc53c44NQ+OUqJ0LgutRfjq4
 hiNFpaYw8Sqkmebs6eSoA7dCDNZFDwt/uis7nH4cPScwA76DuGs6A03MZBXgwH5CZ8/FS/DH+lsNt
 +8ixhTkcTzx+aVOKn5NXUNZlua3Mjw4oK1vJohhgAlH9E4n1m//PyoE/zTb0B/Sdd4FoXq6SaVz6I
 G5BTPYmKfLKZZXOhtNRauQ==;
Date: Sat, 25 Jan 2025 12:42:15 +0200
Message-Id: <86o6zvuqd4.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Jordan Ellis Coppard <jc+o.emacs@HIDDEN>,
 Stefan Monnier <monnier@HIDDEN>
In-Reply-To: <90d148f8-f31d-492b-b4e9-ecc05c3b572b@HIDDEN>
 (bug-gnu-emacs@HIDDEN)
Subject: Re: bug#75730: 31.0.50;
 describe-symbol causing saveplace.el's defuns to evaluate
References: <90d148f8-f31d-492b-b4e9-ecc05c3b572b@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 75730
Cc: 75730 <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 (---)

> Date: Wed, 22 Jan 2025 00:30:41 +0900
> From:  Jordan Ellis Coppard via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN>
> 
> While I was looking at how save-place-mode works I noticed that C-h o
> save-place-mode RET (or any other symbol it defines) causes the actual
> minor-mode logic for save-place-mode to evaluate. The result is it
> parsed the places file, it populated save-place-alist and so forth.
> Visiting the file directly via C-x C-f doesn't do this and the side
> effects of doing so I think constitute a bug.
> 
> A user probably didn't or doesn't want C-h o executing minor-mode BODY
> functions when all they asked for is a description of the symbol. If
> this must occur (as I understand it to gather a complete picture of
> other symbols defined etc) it should definitely not clobber the users
> state.

I don't see the minor mode being turned on by "C-h o".  What I do see
is that the :set function of save-place-abbreviate-file-names fills up
save-place-alist (and maybe does other things).

Stefan, do we have features to avoid that?  Perhaps some value of
:initialize attribute could help?




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

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


Received: (at submit) by debbugs.gnu.org; 21 Jan 2025 15:45:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jan 21 10:45:34 2025
Received: from localhost ([127.0.0.1]:55813 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1taGRY-0007RR-KW
	for submit <at> debbugs.gnu.org; Tue, 21 Jan 2025 10:45:34 -0500
Received: from lists.gnu.org ([2001:470:142::17]:55340)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <jc+o.emacs@HIDDEN>) id 1taGEF-0006aw-Lv
 for submit <at> debbugs.gnu.org; Tue, 21 Jan 2025 10:31:48 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <jc+o.emacs@HIDDEN>) id 1taGDS-0001ky-2r
 for bug-gnu-emacs@HIDDEN; Tue, 21 Jan 2025 10:30:59 -0500
Received: from out-178.mta1.migadu.com ([95.215.58.178])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <jc+o.emacs@HIDDEN>) id 1taGDL-0006gk-0K
 for bug-gnu-emacs@HIDDEN; Tue, 21 Jan 2025 10:30:54 -0500
Message-ID: <90d148f8-f31d-492b-b4e9-ecc05c3b572b@HIDDEN>
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wz.ht; s=key1;
 t=1737473446;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding;
 bh=4lefg42XNAXRkQASqmEieJChY/jjcm5Qt+UiXqxyIF4=;
 b=fR/6KZYYqmBHFtFCrO7LYVORMeRL7AWAgt9Wq4bb535k1saZQMGcymbJa1PqhNiuEXwQCo
 YiJB8R74iNHlLWfxr6ewp4J9+um4xHu7NWLGFIEeDHTEfdBm5+Zmtf+DP8NV4wxau4YD+Z
 bA0r7IYRhNEitXinXBqgVK5ngI4FVF0=
Date: Wed, 22 Jan 2025 00:30:41 +0900
MIME-Version: 1.0
To: bug-gnu-emacs@HIDDEN
Subject: 31.0.50; describe-symbol causing saveplace.el's defuns to evaluate
Content-Language: en-US
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
 include these headers.
From: Jordan Ellis Coppard <jc+o.emacs@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Migadu-Flow: FLOW_OUT
Received-SPF: pass client-ip=95.215.58.178; envelope-from=jc+o.emacs@HIDDEN;
 helo=out-178.mta1.migadu.com
X-Spam_score_int: -27
X-Spam_score: -2.8
X-Spam_bar: --
X-Spam_report: (-2.8 / 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,
 RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001,
 RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.9 (/)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Tue, 21 Jan 2025 10:45:31 -0500
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.1 (/)

Hi there,


There's a long email from myself regarding save-place-mode clobbering
Tramp's cache here:
https://lists.gnu.org/r/tramp-devel/2025-01/msg00012.html

While I was looking at how save-place-mode works I noticed that C-h o
save-place-mode RET (or any other symbol it defines) causes the actual
minor-mode logic for save-place-mode to evaluate. The result is it
parsed the places file, it populated save-place-alist and so forth.
Visiting the file directly via C-x C-f doesn't do this and the side
effects of doing so I think constitute a bug.

A user probably didn't or doesn't want C-h o executing minor-mode BODY
functions when all they asked for is a description of the symbol. If
this must occur (as I understand it to gather a complete picture of
other symbols defined etc) it should definitely not clobber the users
state.

A practical example of this right now is save-place-mode clobbering
Tramp's cache data, and thus Tramp completions too.

To reproduce: ensure that emacs -Q will read the places file you are
already using, otherwise create one it will be able to see with this
example contents:


;;; -*- coding: utf-8; mode: lisp-data -*-
(("/podmancp:no_such_foo:/home/lorem/ipsum.txt" . 1))


Perform emacs -Q and then...

M-: (require 'tramp)
M-: (tramp-cache-print tramp-cache-data)
;; OUTPUT: "((tramp-file-name \"cache\" nil nil nil nil nil nil) 
(\"tramp-version\" \"2.8.0-pre\"))"
C-h o save-place-loaded RET
;; OUTPUT: t
M-: (tramp-cache-print tramp-cache-data)


Observe that the second run of tramp-cache-print will include the bogus
podmancp entry from the places file. Aside: this would perhaps be useful
except that container `no_such_foo` might not exist anymore and M-x
tramp-cleanup-all-connections or other attempts to remove it do nothing.
A user must know that specifically C-h o has caused save-place-mode to
clobber their completions.

Closing Emacs, deleting Tramp's default cache file, and reopning it
works until maybe you're typing a minibuffer completion and happen to
expand save-place- or visit saveplace.el whereby your Tramp completions
(populated in-part from Tramp's cache data) are now clobbered; or
perhaps you have (save-place-mode) in your init.el in which case they
are always clobbered. One can manually remove them from places which
isn't friendly I'd wager; otherwise manually removing projects from
project.el's project file or Tramp's cache file etc would be the
suggested approach instead of us having commands to do so.

Besides those issues I'm confused as to why save-place's functions are
actually executing when all I asked was to describe the symbol
save-place-loaded (another aside: due to this it will ALWAYS be t).
Indeed you can use any symbol saveplace.el defines and it will execute,
reading the save-place file (default: places) and populating
save-place-alist. Since Tramp hooks into file handlers by syntax this
clobbers Tramp if any Tramp-like file names appear (like /podmancp or
/ssh etc). Carefully maintaining and keeping in-sync a list of regexp's
to ignore (said utility functions are in saveplace.el) is not a solution
here because it masks the symptom (amongst other reasons: human
forgetfulness or lazyness, this bug reports contents etc).

The documentation for define-minor-mode states that BODY is executed
when the minor mode is enabled or disabled; but it hasn't been enabled
or disabled here. Is it because describe-symbol is enabling the minor
mode to gather all symbols?

In addition to all the above this also means any user who falls into
this trap has effectively stumbled into save-place-mode sideeffects for
their entire Emacs session even though save-place-mode is nil which
causes strange behaviour I would argue is a bug.


/Jordan


In GNU Emacs 31.0.50 (build 1, aarch64-apple-darwin23.6.0, NS
  appkit-2487.70 Version 14.7.2 (Build 23H311)) of 2025-01-20 built on
  yote.local
Repository revision: 9093a0f824d709af15a29da528259dbca30f5c29
Windowing system distributor 'Apple', version 10.3.2487
System Description:  macOS 14.7.2

Configured using:
  'configure --prefix=/opt/local --disable-silent-rules --without-dbus
  --without-gconf --without-libotf --without-m17n-flt --with-libgmp
  --with-gnutls --with-xml2 --with-modules --with-sqlite3 --with-webp
  --infodir /opt/local/share/info/emacs --disable-gc-mark-trace --with-ns
  --with-lcms2 --without-harfbuzz --without-imagemagick --without-xaw3d
  --with-rsvg --with-xwidgets --with-native-compilation=aot
  --with-tree-sitter 'CFLAGS=-pipe -O2 -march=native -mtune=native
  -Wno-attributes
  -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -arch
  arm64' 'CPPFLAGS=-I/opt/local/include
  -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk'
  'LDFLAGS=-L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-no_pie
  -Wl,-rpath /opt/local/lib/gcc14 -Wl,-rpath /opt/local/lib
  -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk
  -arch arm64''

Configured features:
ACL GIF GLIB GMP GNUTLS JPEG LCMS2 LIBXML2 MODULES NATIVE_COMP NOTIFY
KQUEUE NS PDUMPER PNG RSVG SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS
TREE_SITTER WEBP XIM XWIDGETS ZLIB

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

Major mode: Fundamental

Minor modes in effect:
   mlscroll-mode: t
   vertico-mode: t
   marginalia-mode: t
   eat-eshell-mode: t
   tabspaces-mode: t
   popper-echo-mode: t
   popper-mode: t
   global-git-commit-mode: t
   magit-auto-revert-mode: t
   global-auto-revert-mode: t
   corfu-popupinfo-mode: t
   global-corfu-mode: t
   corfu-mode: t
   meow-global-mode: t
   meow-mode: t
   meow-normal-mode: t
   delete-selection-mode: t
   meow-esc-mode: t
   apheleia-global-mode: t
   apheleia-mode: t
   which-key-mode: t
   electric-pair-mode: t
   elpaca-use-package-mode: t
   override-global-mode: t
   display-battery-mode: t
   recentf-mode: t
   savehist-mode: t
   global-visual-wrap-prefix-mode: t
   visual-wrap-prefix-mode: t
   global-hl-line-mode: t
   tooltip-mode: t
   global-eldoc-mode: t
   show-paren-mode: t
   electric-indent-mode: t
   mouse-wheel-mode: t
   tool-bar-mode: t
   tab-bar-mode: t
   menu-bar-mode: t
   file-name-shadow-mode: t
   context-menu-mode: t
   global-font-lock-mode: t
   font-lock-mode: t
   minibuffer-regexp-mode: t
   column-number-mode: t
   line-number-mode: t
   indent-tabs-mode: t
   transient-mark-mode: t
   auto-composition-mode: t
   auto-encryption-mode: t
   auto-compression-mode: t

Load-path shadows:
/Users/tsujp/.config/emacs/elpaca/builds/modus-themes/theme-loaddefs 
hides 
/Applications/MacPorts/Emacs.app/Contents/Resources/lisp/theme-loaddefs
/Users/tsujp/.config/emacs/elpaca/builds/transient/transient hides 
/Applications/MacPorts/Emacs.app/Contents/Resources/lisp/transient

Features:
(shadow sort display-line-numbers whitespace mail-extr emacsbug help-fns
radix-tree tramp-cmds inspector edebug debug backtrace tree-inspector
treeview keycast dap-mode dap-tasks dap-launch lsp-docker yaml posframe
dap-overlays lsp-mode lsp-protocol xref spinner network-stream nsm
markdown-mode lv ht f s ewoc embark-consult consult magit-bookmark
bookmark embark-org embark ffap htmlize zig-mode reformatter time
mlscroll vertico marginalia esh-mode esh-var esh-cmd esh-ext esh-proc
esh-opt esh-io esh-arg esh-module esh-module-loaddefs esh-util eat
term/xterm xterm tramp trampver tramp-integration tramp-message
tramp-compat parse-time iso8601 tramp-loaddefs term disp-table ehelp
tabspaces dired-x popper-echo popper org-transclusion
org-transclusion-font-lock org-transclusion-src-lines text-clone
org-element org-persist avl-tree generator org-remark
org-remark-global-tracking just-mode magit-submodule magit-blame
magit-stash magit-reflog magit-bisect magit-push magit-pull magit-fetch
magit-clone magit-remote magit-commit magit-sequence magit-notes
magit-worktree magit-tag magit-merge magit-branch magit-reset
magit-files magit-refs magit-status magit package url-handlers
magit-repos magit-apply magit-wip magit-log magit-diff smerge-mode diff
git-commit log-edit message sendmail yank-media puny dired
dired-loaddefs rfc822 mml mml-sec epa epg rfc6068 epg-config gnus-util
mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util
ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader
pcvs-util add-log magit-core magit-autorevert autorevert filenotify
magit-margin magit-transient magit-process with-editor shell server
magit-mode elp transient browse-url xdg magit-git magit-base which-func
imenu vc-git diff-mode track-changes files-x info magit-section comp
comp-cstr comp-run comp-common derived benchmark cursor-sensor crm dash
corfu-popupinfo corfu cus-start edmacro orderless compat meow meow-tutor
meow-cheatsheet meow-cheatsheet-layout meow-core meow-shims delsel
meow-esc meow-command array meow-thing meow-visual meow-keypad
meow-beacon meow-helpers meow-util color meow-keymap meow-face meow-var
avy modus-vivendi-theme modus-themes exec-path-from-shell
zig-mode-autoloads reformatter-autoloads htmlize-autoloads
embark-consult-autoloads embark-autoloads popper-autoloads
dap-mode-autoloads bui-autoloads lsp-treemacs-autoloads
treemacs-autoloads ace-window-autoloads pfuture-autoloads
hydra-autoloads cfrs-autoloads posframe-autoloads lsp-docker-autoloads
yaml-autoloads apheleia-autoloads lsp-mode-autoloads f-autoloads
s-autoloads ht-autoloads spinner-autoloads markdown-mode-autoloads
lv-autoloads keycast-autoloads tree-inspector-autoloads
treeview-autoloads inspector-autoloads diff-hl-autoloads
org-transclusion-autoloads org-remark-autoloads consult-autoloads
tabspaces-autoloads just-mode-autoloads eat-autoloads magit-autoloads
pcase magit-section-autoloads dash-autoloads transient-autoloads
with-editor-autoloads marginalia-autoloads corfu-autoloads
vertico-autoloads orderless-autoloads meow-autoloads avy-autoloads
mlscroll-autoloads modus-themes-autoloads exec-path-from-shell-autoloads
which-key kmacro org-id org-refile org-element-ast inline elec-pair
org-inlinetask org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro
org-src sh-script smie executable ob-comint org-pcomplete pcomplete
org-list org-footnote org-faces org-entities time-date noutline outline
org-version ob-emacs-lisp ob-core ob-eval org-cycle org-table ol
org-fold org-fold-core org-keys oc org-loaddefs find-func cal-menu
calendar cal-loaddefs org-compat org-macs flymake project compile
text-property-search comint ansi-osc ansi-color ring warnings thingatpt
go-ts-mode rx treesit vc vc-dispatcher elpaca-use-package use-package
use-package-delight use-package-diminish use-package-bind-key bind-key
easy-mmode elpaca-use-package-autoloads elpaca-log elpaca-ui
elpaca-menu-elpa elpaca-menu-melpa url url-proxy url-privacy url-expand
url-methods url-history url-cookie generate-lisp-file url-domsuf
url-util url-parse auth-source eieio eieio-core password-cache json map
byte-opt url-vars mailcap elpaca-menu-org elpaca elpaca-process
elpaca-autoloads format-spec battery dbus xml subr-x cl-extra help-mode
recentf tree-widget savehist visual-wrap hl-line cl-macs gv
use-package-ensure cl-seq use-package-core bytecomp byte-compile
cus-edit pp cus-load icons wid-edit cl-loaddefs cl-lib rmc iso-transl
tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks
lisp-float-type elisp-mode 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 lisp-mode prog-mode register
page tab-bar menu-bar rfn-eshadow isearch easymenu timer select
scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors
frame minibuffer nadvice seq simple cl-generic indonesian philippine
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 emoji-zwj charscript
charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure
cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp
files window text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget keymap hashtable-print-readable backquote
threads xwidget-internal kqueue cocoa ns lcms2 multi-tty
make-network-process tty-child-frames native-compile emacs)

Memory information:
((conses 16 918954 745661) (symbols 48 69367 66) (strings 32 345052 35504)
  (string-bytes 1 8102223) (vectors 16 69625) (vector-slots 8 896262 
178568) (floats 8 508 223)
  (intervals 56 897 448) (buffers 992 17))




Acknowledgement sent to Jordan Ellis Coppard <jc+o.emacs@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#75730; 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, 3 Feb 2025 12:30:02 UTC

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