From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ship Mints Newsgroups: gmane.emacs.bugs Subject: bug#74799: [PATCH] Clarify that save-place-file must be set before save-place-mode starts Date: Wed, 11 Dec 2024 15:54:53 -0500 Message-ID: References: <20241211200119.92243-1-hong@topbug.net> <865xnq2cbn.fsf@gnu.org> <87sequymtf.fsf@topbug.net> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000009f3189062904d166" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4800"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 74799@debbugs.gnu.org, Eli Zaretskii To: Hong Xu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 11 21:57:21 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tLTln-00014d-Po for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 11 Dec 2024 21:57:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tLTlZ-0002qW-Cn; Wed, 11 Dec 2024 15:57:05 -0500 Original-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 ) id 1tLTlW-0002qL-Rh for bug-gnu-emacs@gnu.org; Wed, 11 Dec 2024 15:57:02 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tLTlW-0000nw-KB for bug-gnu-emacs@gnu.org; Wed, 11 Dec 2024 15:57:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=Date:From:In-Reply-To:References:MIME-Version:To:Subject; bh=lPSJI8uT46rRcW1qn/Yq0Hv2Ach2HNkMESJDYt/99hA=; b=Ml8H4OHzs84Fj3HrWg22zOqE1ARrKs2dHXx7O08zMDMy37sqICuie7WBzUjFWgdpxKNnr446CjGd0NlXnDf8bozYOjaKJLrETG73VguMSwIKz8K2ZdqernulCsqD/7mjaQuYOgjhg7SDHgxPm5T9fA2Cvtt58cvnkF6Yd+JdCCLlxczwxoPKlGDuvg9XfUHNdJ/ZgICIUqpHicbTILgd0qxM6PQQuRLA7aIPslQsf7gM/ZfCVUndVMSjdLLA0JiZpAFUJ+gbs1QbaULkbkkDpWQ+ZgiNbGQbEpeKq3PpJ2soRXNuWilNOy+9+bQwRGghKog4SPcQHZLhJYZtEkAodQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tLTlW-0006oM-ED for bug-gnu-emacs@gnu.org; Wed, 11 Dec 2024 15:57:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ship Mints Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 11 Dec 2024 20:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74799 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 74799-submit@debbugs.gnu.org id=B74799.173395060326127 (code B ref 74799); Wed, 11 Dec 2024 20:57:02 +0000 Original-Received: (at 74799) by debbugs.gnu.org; 11 Dec 2024 20:56:43 +0000 Original-Received: from localhost ([127.0.0.1]:36453 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tLTlC-0006nJ-DW for submit@debbugs.gnu.org; Wed, 11 Dec 2024 15:56:42 -0500 Original-Received: from mail-vs1-f43.google.com ([209.85.217.43]:54292) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tLTl9-0006mq-C8 for 74799@debbugs.gnu.org; Wed, 11 Dec 2024 15:56:40 -0500 Original-Received: by mail-vs1-f43.google.com with SMTP id ada2fe7eead31-4afde39e360so1490179137.0 for <74799@debbugs.gnu.org>; Wed, 11 Dec 2024 12:56:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733950534; x=1734555334; 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=lPSJI8uT46rRcW1qn/Yq0Hv2Ach2HNkMESJDYt/99hA=; b=T8DgfaYHhDh7/78skQq6Arw7jQT2l524k6PYg2AOMh0eAnJj3YSrJaHiDZiPEZoOl9 5GrwgAIQ7S8zGgaaSwOQib29m0RahgSybvAmGrpmeQ/zkDh0IJoEKisLFUfQ3U/G+AX5 JcVusPHouGsI80JRVi5IyP6SG9Mk/grmfSxotC8o+ZN5H8/B/M22T/KZzcZEVqWfGaVX 7znn8hBPfn1VlJCBoctevHqvkj6srsueRdcloAK0Ju2AVz5nZMTngicwHyPu70Smye+b S5l9ZxsU9JJ2rxX82u1mjvd+Gl9PhdBrt4o69HACR9+V+tsoSdk6J9oRU6beMlMsz6kk VdQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733950534; x=1734555334; 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=lPSJI8uT46rRcW1qn/Yq0Hv2Ach2HNkMESJDYt/99hA=; b=VFgekhU29WU4bTbTO9L1IV0wKkYRajEBpsPEVUQTWh/Y7C0rSdslx+JIU0p8vkKAR1 4B1KeeWtz8U0vhQp2d7v8QX1F1hqhyq27EmpJYWu3uE7/E7Ib8iPtFPO1UK8jMbA3Sha ks1y5mYBSKGk6xy3uNpd127ioOxXFKiGWmgJHnTT0ALgT3uevTPuz8OZZm0+VASTIlVf l8+fa2XNDbsWtj/jtwhnMJuVzd7JeW4BuTy1jyskGAMMDmuzRlT3yE9bnx6XJ5XEFVvO 7d4sbMA9sOjd7zpuyuE2DwokRVKC5qNNB2vbC9ODkud0w/X4579xXhjCzPtyYD8ZfsuU 84vQ== X-Forwarded-Encrypted: i=1; AJvYcCXU8afUjOfNpaR5HfxZqAG84uayZ8+TzbDzVl5ZFDbnZXGEkmNcAs/irHLprC6Gl60ZMk8TCQ==@debbugs.gnu.org X-Gm-Message-State: AOJu0YwQvAIdBUr+k9iQXQqkvCSJQQhg1I6vOKdAOil0xNcqg7iyym4U OI3CQATYGV86LkWlbJt+4YLXHY31XzZx0Px0IcEMKQam+C1CDeRY5SJs1LJPkfXoxVk72noO0hj /kOZSS4LTp2yAZ1xsJ08UW5CJIEU= X-Gm-Gg: ASbGnctkzUAJLfBi9FCeTehYoicyRtf+tMMkBNMwmQvGELvMcANSbCQ2cYooPU9HUxr xNqJROUL7P8PgNrIPhM/SyIATNibCLTTInBo= X-Google-Smtp-Source: AGHT+IFlcIRM719OwI9/7dVlexuS5txovp0MxbKVtVqV/0insa12B70fKGGJsJ2jUlpBl9p8zuDPmgeWQE3UeTG7YNA= X-Received: by 2002:a05:6102:5491:b0:4af:deaf:f891 with SMTP id ada2fe7eead31-4b24777b349mr1485715137.4.1733950533740; Wed, 11 Dec 2024 12:55:33 -0800 (PST) In-Reply-To: <87sequymtf.fsf@topbug.net> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:296868 Archived-At: --0000000000009f3189062904d166 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Using saveplace myself, and having added functionality such as a save timer for which I'll contribute a patch for at some point, I've read the code. If one changes the value of save-place-file from its default to another value after the file has first been read, you'll have to manually reset save-place-loaded to nil to force a reload. The defcustom for save-place-file could be patched to provide a setter which would do that, if that helps. I don't see this issue as I defer save-place-mode until after init when my overrides have already taken effect. On Wed, Dec 11, 2024 at 3:42=E2=80=AFPM Hong Xu wrote: > On 2024-12-11 Wed 12:29 GMT-08, Eli Zaretskii wrote: > > >> From: Hong Xu > >> Date: Wed, 11 Dec 2024 12:00:57 -0800 > >> > >> --- > >> lisp/saveplace.el | 3 ++- > >> 1 file changed, 2 insertions(+), 1 deletion(-) > >> > >> diff --git a/lisp/saveplace.el b/lisp/saveplace.el > >> index 012e305f7f45..ea67c4567b63 100644 > >> --- a/lisp/saveplace.el > >> +++ b/lisp/saveplace.el > >> @@ -63,7 +63,8 @@ save-place-alist > >> This alist is saved between Emacs sessions.") > >> > >> (defcustom save-place-file (locate-user-emacs-file "places" > ".emacs-places") > >> - "Name of the file that records `save-place-alist' value." > >> + "Name of the file that records `save-place-alist' value. > >> +Must be set before starting save-place-mode." > >> :version "24.4" ; added locate-user-emacs-fil= e > >> :type 'file) > > > > Thanks, but how about removing the limitation instead? > > I'm not sure how to do this. It seems to me the limitation didn't exist > in Emacs 29 but suddenly I have to set save-place-file before calling > save-place-mode. I thought this was intended but maybe this is a > regression? > > (It's difficult for me to try out Emacs 29 now to 100% confirm, sorry.) > > -- > Hong > > > > --0000000000009f3189062904d166 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Using saveplace myself, and having added functionality such as a save ti= mer for which I'll contribute a patch for at some point, I've read = the code.

If = one changes the value of=C2=A0save-place-file from its default to another v= alue after the file has first been read, you'll have to manually reset = save-place-loaded to nil to force a reload. The defcustom for=C2=A0save-pla= ce-file could be patched to provide a setter which would do that, if that h= elps. I don't see this issue as I defer save-place-mode until after ini= t when my overrides have already taken=C2=A0effect.

On Wed, Dec 11, 2024 at 3:42=E2=80=AFPM Hong Xu <hong@topbug.net> wrote:
On 2024-12-11 Wed 12:29 GMT-08, Eli Zarets= kii <eliz@gnu.org&= gt; wrote:

>> From: Hong Xu <hong@topbug.net>
>> Date: Wed, 11 Dec 2024 12:00:57 -0800
>>
>> ---
>>=C2=A0 lisp/saveplace.el | 3 ++-
>>=C2=A0 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/lisp/saveplace.el b/lisp/saveplace.el
>> index 012e305f7f45..ea67c4567b63 100644
>> --- a/lisp/saveplace.el
>> +++ b/lisp/saveplace.el
>> @@ -63,7 +63,8 @@ save-place-alist
>>=C2=A0 This alist is saved between Emacs sessions.")
>>=C2=A0
>>=C2=A0 (defcustom save-place-file (locate-user-emacs-file "pla= ces" ".emacs-places")
>> -=C2=A0 "Name of the file that records `save-place-alist'= value."
>> +=C2=A0 "Name of the file that records `save-place-alist'= value.
>> +Must be set before starting save-place-mode."
>>=C2=A0 =C2=A0 :version "24.4"=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0; added locate-user-= emacs-file
>>=C2=A0 =C2=A0 :type 'file)
>
> Thanks, but how about removing the limitation instead?

I'm not sure how to do this. It seems to me the limitation didn't e= xist
in Emacs 29 but suddenly I have to set save-place-file before calling
save-place-mode. I thought this was intended but maybe this is a
regression?

(It's difficult for me to try out Emacs 29 now to 100% confirm, sorry.)=

--
Hong



--0000000000009f3189062904d166--