GNU bug report logs -
#64911
30.0.50; switch-to-buffer-preserve-window-point not respected by switch-to-(next|prev)-buffer
Previous Next
Full log
View this message in rfc822 format
> Cc: Adam Porter <adam <at> alphapapa.net>
> Date: Fri, 28 Jul 2023 19:11:07 +1200
> From: Phil Sainty <psainty <at> orcon.net.nz>
>
> 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.
Why cannot you use replace-buffer-contents instead of erasing the
buffer and rebuilding it? That function attempts to preserve the
markers.
> 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.
In general, when you rebuild the buffer's contents, there's no
guarantee the old buffers will be even useful. What markers are we
talking about, besides window-point?
This bug report was last modified 2 years and 52 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.