Subject: bug#64911: 30.0.50; switch-to-buffer-preserve-window-point not respected by switch-to-(next|prev)-buffer

From: Phil Sainty <[email-masked]>
Date: Fri, 28 Jul 2023 19:11:07 +1200

Tangentially, I can't see any function for obtaining all the
markers for a given buffer.  I see that this has been raised
before as https://debbugs.gnu.org/cgi/bugreport.cgi?bug=35536

There's clearly resistance to implementing that, but... it
would be very useful for cases like the one I'm looking at.

Specifically, the code which is erasing the buffer and then
rebuilding it could firstly loop over the buffer markers, store
some kind of relevant context for each one and then, after
rebuilding the buffer, it could locate the equivalent context
in the new buffer text and update each of those markers
accordingly.

Without a way of querying the buffer's markers it's necessary
to just *know* about them and how to access them; and there's
no guarantee that new markers won't come into play behind the
scenes in future, so it would be useful to be able to access
the list without having to have advance information about how
and where they were being created.

-Phil