all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: Marcin Borkowski <mbork@mbork.pl>
Cc: help-gnu-emacs@gnu.org
Subject: Re: A strange issue with buffer-undo-list
Date: Tue, 09 Mar 2021 01:32:21 +0100	[thread overview]
Message-ID: <87r1kp9nfu.fsf@web.de> (raw)
In-Reply-To: <87blbtiapu.fsf@mbork.pl> (Marcin Borkowski's message of "Mon, 08 Mar 2021 22:42:21 +0100")

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	other threads:[~2021-03-09  0:32 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-23  5:19 A strange issue with buffer-undo-list Marcin Borkowski
2021-02-24  0:43 ` Michael Heerdegen
2021-02-25  5:16   ` Marcin Borkowski
2021-02-25  5:28     ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-02-25 14:19       ` Stefan Monnier
2021-02-25 15:58         ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-03-08 21:43       ` Marcin Borkowski
2021-02-26  0:53     ` Michael Heerdegen
2021-03-08 21:42       ` Marcin Borkowski
2021-03-09  0:32         ` Michael Heerdegen [this message]
2021-03-09 21:22           ` Marcin Borkowski
2021-02-24  2:11 ` Michael Heerdegen
2021-02-24  3:33 ` Michael Heerdegen
2021-02-24  4:49   ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r1kp9nfu.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=help-gnu-emacs@gnu.org \
    --cc=mbork@mbork.pl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.