GNU bug report logs - #79200
31.0.50; Duplicated elements for '#<marker at' in buffer-undo-list

Previous Next

Package: emacs;

Reported by: Óscar Fuentes <oscarfv <at> eclipso.eu>

Date: Fri, 8 Aug 2025 16:45:03 UTC

Severity: normal

Found in version 31.0.50

Full log


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

From: Óscar Fuentes <oscarfv <at> eclipso.eu>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: pipcet <at> protonmail.com, Helmut Eller <eller.helmut <at> gmail.com>,
 Gerd Möllmann <gerd.moellmann <at> gmail.com>,
 79200 <at> debbugs.gnu.org, Alan Mackenzie <acm <at> muc.de>,
 Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#79200: 31.0.50; Duplicated elements for '#<marker at' in
 buffer-undo-list
Date: Tue, 12 Aug 2025 13:02:22 +0200
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>> I still don't understand why these marker entries in the undo list are
>> made. Maybe someone else knows?
>
> The automatic update of markers is insufficiently precise when the we
> undo a text deletion, because all the markers that were anywhere within
> the deleted text end up with the same position after the deletion.
> So we have to record the offset for those markers that were in the
> middle of the deleted text such that when we re-insert the text we can
> put those markers back to where they were.

Yeah, I was suspecting that and expecting some breakage due to my
barbaric workaround.

However, the fact that still no breakage was observed makes me think
that those markers are created for a very brief use (within the
execution span of a single command, for instance.)





This bug report was last modified today.

Previous Next


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