Subject: bug#79200: 31.0.50; Duplicated elements for '#<marker at' in buffer-undo-list

From: Óscar Fuentes <[email-masked]>
Date: Sat, 09 Aug 2025 20:28:21 +0200

Alan Mackenzie <[email-masked]> writes:

> I have an equally simple recipe, which suggests undo is not the culprit.
> Note step 3.
>
> 1. emacs -Q
> 2. Type asdf.
> 3. M-: buffer-undo-list.  This gives:
>
>     (nil (148 . 152) (t . 0) nil (1 . 148) (t . 0))
>
> 4. Type <backspace>.
> 5. M-: buffer-undo-list.  This gives:
>
>     (nil (#("f" 0 1 (fontified t)) . -151) (#<marker at 151 in *scratch*>
>     . -1) (#<marker at 151 in *scratch*> . -1) (#<marker at 151 in
>     *scratch*> . -1) (#<marker at 151 in *scratch*> . -1) (#<marker at
>     151 in *scratch*> . -1) (#<marker at 15\1 in *scratch*> . -1)
>     (#<marker at 151 in *scratch*> . -1) (#<marker at 151 in *scratch*> .
>     -1) (#<marker at 151 in *scratch*> . -1) 152 ...)

Thanks Alan.

>   [ That enforced dumning down of the output by truncation is most
>   annoying.  I haven't found a way to get a complete output. ]

I use C-h v buffer-undo-list which has no qualms about displaying
thousands of lines.

> Unlike other people here, I see this in the emacs-30 branch, too.

Interesting, because the commit I bisected as the cause (6f494d74f64) is
only in master and igc. There is something much more general at play
here, as you suggest.