GNU bug report logs - #74799
Support setting `save-place-file' after running `save-place-mode'

Previous Next

Package: emacs;

Reported by: Hong Xu <hong <at> topbug.net>

Date: Wed, 11 Dec 2024 20:02:02 UTC

Severity: wishlist

Full log


View this message in rfc822 format

From: Ship Mints <shipmints <at> gmail.com>
To: Hong Xu <hong <at> topbug.net>
Cc: 74799 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
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 part 1 (text/plain, inline)]
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 <at> topbug.net> wrote:

> On 2024-12-11 Wed 12:29 GMT-08, Eli Zaretskii <eliz <at> gnu.org> wrote:
>
> >> From: Hong Xu <hong <at> 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
>
>
>
>
[Message part 2 (text/html, inline)]

This bug report was last modified 165 days ago.

Previous Next


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