GNU bug report logs -
#62413
29.0.60; [PATCH] save-place-mode cannot restore saved position
Previous Next
Reported by: Liu Hui <liuhui1610 <at> gmail.com>
Date: Fri, 24 Mar 2023 04:10:02 UTC
Severity: normal
Tags: patch
Found in version 29.0.60
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: Liu Hui <liuhui1610 <at> gmail.com>
> Date: Sun, 26 Mar 2023 09:26:22 +0800
> Cc: 62413 <at> debbugs.gnu.org
>
> > But now testing save-place-abbreviate-file-names here should be
> > redundant, right?
> >
> > Also, I think we should first test buffer-file-name, and only after
> > that its abbreviated variant.
>
> I don't think so. Consider the following case:
>
> - open file A and then close the buffer:
> (buffer-file-name . position1) is saved in save-place-alist
>
> - then set save-place-abbreviate-file-names to t
>
> - open file A, scroll the buffer and close it:
> (abbreviated-file-name . position2) is saved
>
> - open file A again, and the point will be at position1 if
> buffer-file-name is tested first. But I would expect the point is at
> position2.
Ugh! This feature was not thought out well enough when it was
introduced: if the user changes the value half-way through a session,
the history will record visited files twice, under 2 different
file-name formats and with different places recorded. I think
changing the value of save-place-abbreviate-file-names should rewrite
the entire alist in the selected format.
This bug report was last modified 2 years and 106 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.