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 #305 received at 79200 <at> debbugs.gnu.org (full text, mbox):

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

> I more wonder why those limits are so low.  It's a long time since PCs'
> RAM capacity was measured in mere megabytes.

That, and then the fact that I can produce very long undo list, as long
as they don't exceed the size in bytes limits. And these lists can
contain a lot of markers.

(defun my-test-undo-list ()
  (interactive)
  (with-current-buffer (get-buffer-create "undo-list-test.txt")
    (erase-buffer)
    (setf buffer-undo-list nil)
    (dotimes (i 1000)
      (dotimes (j 10)
	(insert "abcd")
	(dotimes (i 5) (point-marker))
	(backward-delete-char 1)
	(undo-boundary)
	(insert "\n")))
    '(igc-collect)
    (message "undo-list length %d (%d)" (length buffer-undo-list) n-compacted)
    '(kill-buffer (current-buffer))))

The above produces an undo list with length 80000.

I think it might make sense to limit that to some reasonable number.




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.