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

From: Gerd Möllmann <[email-masked]>
Date: Tue, 12 Aug 2025 06:49:54 +0200

Gerd Möllmann <[email-masked]> writes:

> Óscar Fuentes <[email-masked]> writes:
>
>> I think Emacs/igc is using less memory than usual (in my past experience
>> at this time it should be well over 1GB, but it's stabilized on
>> 0.8GB.)
>
> I still don't understand why these marker entries in the undo list are
> made. Maybe someone else knows?
>
> I mean, when we undo, markers may have to be adjusted, that's clear. But
> why only specific markers, the ones having marker entries? Why not go
> go over all buffer markers and adjust them according to what is undone?
>
> I don't get it :-/.

Whatever. After landing here

37ea8275f7faad1192ddaba9f4a0789580675e17
Author:     Barry O'Reilly <[email-masked]>
AuthorDate: Mon Mar 24 22:47:39 2014 -0400
Commit:     Barry O'Reilly <[email-masked]>
CommitDate: Mon Mar 24 22:47:39 2014 -0400

in the history, I doubt it is wise to pursue the idea of removing marker
entries further, unless we have someone who knows the undo code in and
out.

An alternative for igc, maybe, could be to make the markers in the
marker adjustment entries weak references. We'd need such weak
references, though, as Lisp objects. I have a vague memory that igc had
that at some point, does someone remember?