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

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

Re: A strange issue with buffer-undo-list


From: Michael Heerdegen
Subject: Re: A strange issue with buffer-undo-list
Date: Tue, 09 Mar 2021 01:32:21 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Marcin Borkowski <mbork@mbork.pl> writes:

> > Seems so.  Where they are used - e.g. in the implementation of
> > `transpose-subr', they are important however.  You wouldn't want that
> > undoing a transposition would happen in multiple steps uncovering
> > implementation details.
>
> Agreed, although I don't think undo would kick in within one command
> (without explicit undo boundaries).

Maybe I had not yet completely understood how this works.  It seems one
(primitive) undo undoes until it finds a boundary, and boundaries seem
to be implicitly inserted after any command.  Then I think the change
group is used in `transpose-subr' to prevent that the transposition or
its undoing is left in a half-done state in case of an error, and it has
more or less no user visible effect if no errors happen.

Someone should really write a short summary on how the undo system is
implemented, it is not trivial and finding out is also not.

Regards,

Michael.



reply via email to

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