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: Marcin Borkowski
Subject: Re: A strange issue with buffer-undo-list
Date: Tue, 09 Mar 2021 22:22:30 +0100
User-agent: mu4e 1.1.0; emacs 28.0.50

On 2021-03-09, at 01:32, Michael Heerdegen <michael_heerdegen@web.de> wrote:

> 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.

Yeah, I'd also like to read that.  (I'd like to write it, too, but I'm
afraid I might not be competent enough...)

Best,

-- 
Marcin Borkowski
http://mbork.pl



reply via email to

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