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


View this message in rfc822 format

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

* src/undo.c (truncate_undo_list): Use undo_group_limit.
(syms_of_undo): Add DEFVAR_INT.

[snip]

Thank you for the detailed explanation. I'm running it now on one of the
two machines that I use daily. Apart from reporting obvious problems, do
you want other info that requires inspecting buffer-undo-list or
anything else from time to time?

BTW, saying "No one would do 1000 undos" sounds very sensible. But on
some circunstances I've seen how almost every character produced an undo
boundary (time ago with Evil, now it seems better.) Also, some packages
allow you to navigate the undo history on a way that is easy to restore
the state of the buffer when its content's met certain criteria, like
some text was added or removed, which could happened long time ago on
the session. Having a limit of 200 (or 2000) undo steps may be
constraining for the users of those packages. Also, it would be
interesting to see how much memory the average undo step consumes
(without the pathological marker adjustment elements.) That way we could
know if your change is significantly reducing the amount of undo info
that Emacs traditionally stored.

While writing this e-mail the associated buffer-undo-list grew to 6000+
elements, almost all of them marker adjustments. Executing igc-collect
made no difference, but IIUC this is expected, the effects of your patch
should begin after exceeding undo-group-limit. While writing English
prose I make *lots* of corrections, maybe that's one of the main reasons
why the problem affects me on a larger way.

Just before finishing this e-mail, buffer-undo-list went down to 3000+
elements, almost all of them markers.





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.