From: Eli Zaretskii <eliz@gnu.org>
To: Liu Hui <liuhui1610@gmail.com>
Cc: 62413@debbugs.gnu.org
Subject: bug#62413: 29.0.60; [PATCH] save-place-mode cannot restore saved position
Date: Sun, 26 Mar 2023 08:20:48 +0300 [thread overview]
Message-ID: <83zg809jgv.fsf@gnu.org> (raw)
In-Reply-To: <CAOQTW-MGAd9f+UfJpt8vY5wngO_6BPFqXQCQXVx1fcYM2yhhLA@mail.gmail.com> (message from Liu Hui on Sun, 26 Mar 2023 09:26:22 +0800)
> From: Liu Hui <liuhui1610@gmail.com>
> Date: Sun, 26 Mar 2023 09:26:22 +0800
> Cc: 62413@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.
next prev parent reply other threads:[~2023-03-26 5:20 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-24 2:19 bug#62413: 29.0.60; [PATCH] save-place-mode cannot restore saved position Liu Hui
2023-03-25 11:52 ` Eli Zaretskii
2023-03-25 14:14 ` Liu Hui
2023-03-25 14:17 ` Eli Zaretskii
2023-03-26 1:26 ` Liu Hui
2023-03-26 5:20 ` Eli Zaretskii [this message]
2023-03-28 5:56 ` Liu Hui
2023-03-28 12:03 ` Eli Zaretskii
2023-03-30 2:49 ` Liu Hui
2023-03-30 5:34 ` Eli Zaretskii
2023-04-03 1:02 ` Liu Hui
2023-04-03 2:45 ` Ruijie Yu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-04 1:37 ` Liu Hui
2023-04-06 10:27 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83zg809jgv.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=62413@debbugs.gnu.org \
--cc=liuhui1610@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.