all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Phil Sainty <psainty@orcon.net.nz>
Cc: adam@alphapapa.net, 64911@debbugs.gnu.org
Subject: bug#64911: 30.0.50; switch-to-buffer-preserve-window-point not respected by switch-to-(next|prev)-buffer
Date: Fri, 28 Jul 2023 14:04:09 +0300	[thread overview]
Message-ID: <83pm4cjo0m.fsf@gnu.org> (raw)
In-Reply-To: <ce12565d7b79d19ce0199b4d8461badb@webmail.orcon.net.nz> (message from Phil Sainty on Fri, 28 Jul 2023 19:11:07 +1200)

> Cc: Adam Porter <adam@alphapapa.net>
> Date: Fri, 28 Jul 2023 19:11:07 +1200
> From: Phil Sainty <psainty@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?





  reply	other threads:[~2023-07-28 11:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-28  5:24 bug#64911: 30.0.50; switch-to-buffer-preserve-window-point not respected by switch-to-(next|prev)-buffer Phil Sainty
     [not found] ` <handler.64911.B.169052190417878.ack@debbugs.gnu.org>
2023-07-28  7:11   ` Phil Sainty
2023-07-28 11:04     ` Eli Zaretskii [this message]
2023-07-28  7:21 ` Eli Zaretskii
2023-07-29  8:08   ` martin rudalics

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=83pm4cjo0m.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=64911@debbugs.gnu.org \
    --cc=adam@alphapapa.net \
    --cc=psainty@orcon.net.nz \
    /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.