* bug#74799: [PATCH] Clarify that save-place-file must be set before save-place-mode starts
@ 2024-12-11 20:00 Hong Xu
2024-12-11 20:29 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: Hong Xu @ 2024-12-11 20:00 UTC (permalink / raw)
To: 74799
---
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-file
:type 'file)
--
2.45.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* bug#74799: [PATCH] Clarify that save-place-file must be set before save-place-mode starts
2024-12-11 20:00 bug#74799: [PATCH] Clarify that save-place-file must be set before save-place-mode starts Hong Xu
@ 2024-12-11 20:29 ` Eli Zaretskii
2024-12-11 20:41 ` Hong Xu
0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2024-12-11 20:29 UTC (permalink / raw)
To: Hong Xu; +Cc: 74799
> From: Hong Xu <hong@topbug.net>
> 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-file
> :type 'file)
Thanks, but how about removing the limitation instead?
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#74799: [PATCH] Clarify that save-place-file must be set before save-place-mode starts
2024-12-11 20:29 ` Eli Zaretskii
@ 2024-12-11 20:41 ` Hong Xu
2024-12-11 20:54 ` Ship Mints
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Hong Xu @ 2024-12-11 20:41 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 74799
On 2024-12-11 Wed 12:29 GMT-08, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Hong Xu <hong@topbug.net>
>> 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-file
>> :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
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#74799: [PATCH] Clarify that save-place-file must be set before save-place-mode starts
2024-12-11 20:41 ` Hong Xu
@ 2024-12-11 20:54 ` Ship Mints
2024-12-11 20:58 ` Eli Zaretskii
2024-12-11 21:01 ` Eli Zaretskii
2 siblings, 0 replies; 6+ messages in thread
From: Ship Mints @ 2024-12-11 20:54 UTC (permalink / raw)
To: Hong Xu; +Cc: 74799, Eli Zaretskii
[-- Attachment #1: Type: text/plain, Size: 1945 bytes --]
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 PM Hong Xu <hong@topbug.net> wrote:
> On 2024-12-11 Wed 12:29 GMT-08, Eli Zaretskii <eliz@gnu.org> wrote:
>
> >> From: Hong Xu <hong@topbug.net>
> >> 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-file
> >> :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
>
>
>
>
[-- Attachment #2: Type: text/html, Size: 2863 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#74799: [PATCH] Clarify that save-place-file must be set before save-place-mode starts
2024-12-11 20:41 ` Hong Xu
2024-12-11 20:54 ` Ship Mints
@ 2024-12-11 20:58 ` Eli Zaretskii
2024-12-11 21:01 ` Eli Zaretskii
2 siblings, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2024-12-11 20:58 UTC (permalink / raw)
To: Hong Xu; +Cc: 74799
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#74799: [PATCH] Clarify that save-place-file must be set before save-place-mode starts
2024-12-11 20:41 ` Hong Xu
2024-12-11 20:54 ` Ship Mints
2024-12-11 20:58 ` Eli Zaretskii
@ 2024-12-11 21:01 ` Eli Zaretskii
2 siblings, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2024-12-11 21:01 UTC (permalink / raw)
To: Hong Xu; +Cc: 74799
> From: Hong Xu <hong@topbug.net>
> Cc: 74799@debbugs.gnu.org
> Date: Wed, 11 Dec 2024 12:41:32 -0800
>
> On 2024-12-11 Wed 12:29 GMT-08, Eli Zaretskii <eliz@gnu.org> wrote:
>
> >> - "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-file
> >> :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.)
I'd start by comparing saveplace.el in Emacs 28 and Emacs 29.
You could also try loading saveplace.el from Emacs 28 into an Emacs 29
session, to see if the problems you have go away.
Btw, what actually happens if you modify the file name after you turn
on save-place-mode? what doesn't work?
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-12-11 21:01 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-11 20:00 bug#74799: [PATCH] Clarify that save-place-file must be set before save-place-mode starts Hong Xu
2024-12-11 20:29 ` Eli Zaretskii
2024-12-11 20:41 ` Hong Xu
2024-12-11 20:54 ` Ship Mints
2024-12-11 20:58 ` Eli Zaretskii
2024-12-11 21:01 ` Eli Zaretskii
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).