unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#53945: saveplace should save the buffer's mark list too
@ 2022-02-11 21:36 emacsq via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-02-12 19:30 ` Juri Linkov
  0 siblings, 1 reply; 5+ messages in thread
From: emacsq via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-02-11 21:36 UTC (permalink / raw)
  To: 53945

[-- Attachment #1: Type: text/plain, Size: 438 bytes --]

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.

[-- Attachment #2: Type: text/html, Size: 514 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#53945: saveplace should save the buffer's mark list too
  2022-02-11 21:36 bug#53945: saveplace should save the buffer's mark list too emacsq via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-02-12 19:30 ` Juri Linkov
  2022-02-12 20:09   ` emacsq via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 5+ messages in thread
From: Juri Linkov @ 2022-02-12 19:30 UTC (permalink / raw)
  To: 53945; +Cc: laszlomail

> 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?





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#53945: saveplace should save the buffer's mark list too
  2022-02-12 19:30 ` Juri Linkov
@ 2022-02-12 20:09   ` emacsq via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-02-13 18:38     ` Juri Linkov
  0 siblings, 1 reply; 5+ messages in thread
From: emacsq via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-02-12 20:09 UTC (permalink / raw)
  To: Juri Linkov; +Cc: 53945

> 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.







^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#53945: saveplace should save the buffer's mark list too
  2022-02-12 20:09   ` emacsq via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-02-13 18:38     ` Juri Linkov
  2022-02-13 19:20       ` emacsq via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 5+ messages in thread
From: Juri Linkov @ 2022-02-13 18:38 UTC (permalink / raw)
  To: emacsq; +Cc: 53945

>> 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?





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#53945: saveplace should save the buffer's mark list too
  2022-02-13 18:38     ` Juri Linkov
@ 2022-02-13 19:20       ` emacsq via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 0 replies; 5+ messages in thread
From: emacsq via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-02-13 19:20 UTC (permalink / raw)
  To: Juri Linkov; +Cc: 53945


> 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.






^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-02-13 19:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-11 21:36 bug#53945: saveplace should save the buffer's mark list too emacsq via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-12 19:30 ` Juri Linkov
2022-02-12 20:09   ` emacsq via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-13 18:38     ` Juri Linkov
2022-02-13 19:20       ` emacsq via Bug reports for GNU Emacs, the Swiss army knife of text editors

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).