GNU bug report logs - #53945
saveplace should save the buffer's mark list too

Previous Next

Package: emacs;

Reported by: emacsq <laszlomail <at> protonmail.com>

Date: Fri, 11 Feb 2022 21:37:01 UTC

Severity: wishlist

To reply to this bug, email your comments to 53945 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#53945; Package emacs. (Fri, 11 Feb 2022 21:37:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to emacsq <laszlomail <at> protonmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 11 Feb 2022 21:37:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: emacsq <laszlomail <at> protonmail.com>
To: "Bug reports for GNU Emacs,
 the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
Subject: saveplace should save the buffer's mark list too
Date: Fri, 11 Feb 2022 21:36:06 +0000
[Message part 1 (text/plain, inline)]
saveplace is great when I open a file and I'm right there where I was last time.

But sometimes I remember being at various locations in the file and I want to quickly visit some of them via the mark ring, but alas the mark ring is not restored.

The mark locations are also places in a file, so saveplace should save and restore the buffer's mark ring too, in addition to the last cursor location, so that the mark ring info is not lost.
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53945; Package emacs. (Sat, 12 Feb 2022 19:49:02 GMT) Full text and rfc822 format available.

Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: emacsq via "Bug reports for GNU Emacs, the Swiss army knife of text
 editors" <bug-gnu-emacs <at> gnu.org>
Cc: emacsq <laszlomail <at> protonmail.com>, 53945 <at> debbugs.gnu.org
Subject: Re: bug#53945: saveplace should save the buffer's mark list too
Date: Sat, 12 Feb 2022 21:30:31 +0200
> saveplace is great when I open a file and I'm right there where I was last
> time.
>
> But sometimes I remember being at various locations in the file and I want
> to quickly visit some of them via the mark ring, but alas the mark ring is
> not restored.
>
> The mark locations are also places in a file, so saveplace should save and
> restore the buffer's mark ring too, in addition to the last cursor
> location, so that the mark ring info is not lost.

Did you know that desktop-save-mode saves the mark ring of every buffer?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53945; Package emacs. (Sat, 12 Feb 2022 19:49:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53945; Package emacs. (Sat, 12 Feb 2022 20:11:02 GMT) Full text and rfc822 format available.

Message #14 received at submit <at> debbugs.gnu.org (full text, mbox):

From: emacsq <laszlomail <at> protonmail.com>
To: Juri Linkov <juri <at> linkov.net>
Cc: "emacsq via \"Bug reports for GNU Emacs,
 the Swiss army knife of text editors\"" <bug-gnu-emacs <at> gnu.org>,
 53945 <at> debbugs.gnu.org
Subject: Re: bug#53945: saveplace should save the buffer's mark list too
Date: Sat, 12 Feb 2022 20:09:53 +0000
> Did you know that desktop-save-mode saves the mark ring of every buffer?

No, but I don't use desktop mode, I like to start with  no buffers
when I restart emacs. But when I open a file then I like it when it
puts the cursor to where it was last time. That's why I use saveplace
to save this location info and also saving other useful locations in the
file (the mark ring) is a logical and handy improvement to it.






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53945; Package emacs. (Sat, 12 Feb 2022 20:11:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53945; Package emacs. (Sun, 13 Feb 2022 18:46:02 GMT) Full text and rfc822 format available.

Message #20 received at 53945 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: emacsq <laszlomail <at> protonmail.com>
Cc: 53945 <at> debbugs.gnu.org
Subject: Re: bug#53945: saveplace should save the buffer's mark list too
Date: Sun, 13 Feb 2022 20:38:29 +0200
>> Did you know that desktop-save-mode saves the mark ring of every buffer?
>
> No, but I don't use desktop mode, I like to start with  no buffers
> when I restart emacs. But when I open a file then I like it when it
> puts the cursor to where it was last time. That's why I use saveplace
> to save this location info and also saving other useful locations in the
> file (the mark ring) is a logical and handy improvement to it.

The format used by saveplace.el allows adding more data,
so it's easy to add the mark ring.

But are you sure that the package with the name "saveplace"
is a suitable place to save the mark ring?

For example, saveplace.el is optimized to not save the location
when point is at the beginning of the buffer.  So in such cases
the mark ring will not be saved too.

You said that don't want to use the desktop mode.
What if someone would like to save only the mark ring,
but not to save locations in files?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53945; Package emacs. (Sun, 13 Feb 2022 19:21:02 GMT) Full text and rfc822 format available.

Message #23 received at 53945 <at> debbugs.gnu.org (full text, mbox):

From: emacsq <laszlomail <at> protonmail.com>
To: Juri Linkov <juri <at> linkov.net>
Cc: 53945 <at> debbugs.gnu.org
Subject: Re: bug#53945: saveplace should save the buffer's mark list too
Date: Sun, 13 Feb 2022 19:20:11 +0000
> But are you sure that the package with the name "saveplace"
> is a suitable place to save the mark ring?

Since marks are also places in the file it's not unnatural if
saveplace saves other places too.  .

> For example, saveplace.el is optimized to not save the location
> when point is at the beginning of the buffer. So in such cases
> the mark ring will not be saved too.

I guess it's not hard to disable this optimization if marks are
also saved.

> What if someone would like to save only the mark ring,
> but not to save locations in files?

This can be solved with a new option if the need ever arises,
and the option may not even affect the saving part (who cares
if the current location is saved along with the marks, just
one more number), only the restoring of the position is skipped
when the file is opened.





This bug report was last modified 2 years and 317 days ago.

Previous Next


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