bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#46908: 28.0.50; Dozens of spurious markers in buffer-undo-list


From: martin rudalics
Subject: bug#46908: 28.0.50; Dozens of spurious markers in buffer-undo-list
Date: Mon, 8 Mar 2021 09:26:42 +0100

>> I cannot confirm that, no.  I can reproduce the issue in a newly built
>> Emacs 27 as well as in the 27 that comes with Debian.  "It" again being
>> `count-markers-in-buffer-undo-list'.
>
> The issue disappears (marker count stays constantly less than 3) if I
> comment out these two expressions in `push-mark':
>
>    (add-to-history 'mark-ring (copy-marker (mark-marker)) mark-ring-max t)
>
>    (add-to-history
>      'global-mark-ring (copy-marker (mark-marker)) global-mark-ring-max t)
>
> I think we really have a problem here: when those newly created markers
> are thrown out of the rings, they are not invalidated, and are also
> still referenced by buffer-undo-list, so they will live forever, AFAIU.

So you mean that we really have two problems here, both caused by
`push-mark'?  IIUC a marker is "thrown out of the rings" when its buffer
gets deleted or a marker is pushed on a "full" ring.  I suppose that
"invalidating" markers in these cases should be safe.  But how comes
that `add-to-history' affects `buffer-undo-list'?

martin





reply via email to

[Prev in Thread] Current Thread [Next in Thread]