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

From: Gerd Möllmann <[email-masked]>
Date: Sat, 09 Aug 2025 10:29:15 +0200

Óscar Fuentes <[email-masked]> writes:

> emacs -Q
>
> write in *scratch* some lines with random words:
>
> arins
> arseina
> aierni
>
> iosrn nioni
> ionugfw
>
> sronuf
>
> Now undo a few of those lines (C-_), move the cursor and C-_ again to
> redo.

Interesting. I come from a slightly different angle, that in my mac+igc
port I had sometimes only 3 undos before I got "no more undo
information". and I thought I had messed up something.

My cimpler recipe is

1. Make a new buffer x.el
2. Type an a
3. undo
4. C-h v buffer-undo-list

=> 

Value:
(nil ("a" . 1) (#<marker at 1 in x.el> . -1)
     (#<marker at 1 in x.el> . -1) (#<marker at 1 in x.el> . -1)
     (#<marker at 1 in x.el> . -1) (#<marker at 1 in x.el> . -1)
     (#<marker at 1 in x.el> . -1) (#<marker at 1 in x.el> . -1)
     (#<marker at 1 in x.el> . -1) (#<marker at 1 in x.el> . -1)
     (#<marker at 1 in x.el> . -1) (#<marker at 1 in x.el> . -1)
     (#<marker at 1 in x.el> . -1) (#<marker at 1 in x.el> . -1)
     (#<marker at 1 in x.el> . -1) (#<marker at 1 in x.el> . -1)
     (#<marker at 1 in x.el> . -1) (#<marker at 1 in x.el> . -1)
     (#<marker at 1 in x.el> . -1) (#<marker at 1 in x.el> . -1)
     (#<marker at 1 in x.el> . -1) nil (1 . 2) (t . 0))
Local in buffer x.el; global value is nil

So far I can't see what is the cause. I would have guessed something in
or around primitive-undo, but that hasn't changed forever.

Adding Stef.