unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>, 33341@debbugs.gnu.org
Subject: bug#33341: 27.0.50; Undo log merging and change groups
Date: Thu, 26 Nov 2020 13:34:40 +0100	[thread overview]
Message-ID: <87blfkthy7.fsf@gnus.org> (raw)
In-Reply-To: <877ehk3ve4.fsf@web.de> (Michael Heerdegen's message of "Sun, 11 Nov 2018 08:50:43 +0100")

Michael Heerdegen <michael_heerdegen@web.de> writes:

> I have been playing with the undo change group functions.  I found
> `cancel-change-group' does not always work as expected.  For example, if
> you define
>
> (defun my-test-change-groups ()
>   (interactive)
>   (insert "0\n")
>   (let ((g (prepare-change-group)))
>     (activate-change-group g)
>     (insert "b\n")
>     (insert "c\n")
>     (cancel-change-group g)))
>
> and call that command in some random buffer, the final
> `cancel-change-group' has no effect (i.e. nothing is reverted).  In
> other, similar examples, `cancel-change-group' seems to revert more than
> it should.

Hm...  Well, after running this command, hitting "undo" removes all the
three lines, which is what I'd expect?  Since you cancelled the change
group?

Or...  Hm.  Well, calling accept-change-group has exactly the same
effect, so it seems like I'm misunderstanding how this is supposed to
work.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  reply	other threads:[~2020-11-26 12:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-11  7:50 bug#33341: 27.0.50; Undo log merging and change groups Michael Heerdegen
2020-11-26 12:34 ` Lars Ingebrigtsen [this message]
2020-11-26 14:16   ` Michael Heerdegen
2020-11-26 14:49     ` Michael Heerdegen
2020-11-26 20:26       ` Michael Heerdegen
2020-11-26 20:55         ` Stefan Monnier
2020-11-27  1:11           ` Michael Heerdegen
2020-11-27 14:44             ` Stefan Monnier
2020-11-27 17:43               ` Michael Heerdegen

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87blfkthy7.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=33341@debbugs.gnu.org \
    --cc=michael_heerdegen@web.de \
    --cc=monnier@iro.umontreal.ca \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).