From: Michael Heerdegen <michael_heerdegen@web.de>
To: Lars Ingebrigtsen <larsi@gnus.org>
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 15:49:29 +0100 [thread overview]
Message-ID: <87o8jkgoli.fsf@web.de> (raw)
In-Reply-To: <87zh3442zo.fsf@web.de> (Michael Heerdegen's message of "Thu, 26 Nov 2020 15:16:59 +0100")
Michael Heerdegen <michael_heerdegen@web.de> writes:
> Lars Ingebrigtsen <larsi@gnus.org> writes:
>
> > 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?
>
> AFAIU `cancel-change-group' itself should undo the change set, without
> the user invoking `undo'. See the implementation of
> `atomic-change-group' for a use of this feature.
BTW, coming back to my example:
#+begin_src emacs-lisp
(defun my-test-change-groups ()
(interactive)
(insert "0\n") ;; try to comment this line
(let ((g (prepare-change-group)))
(activate-change-group g)
(insert "b\n")
(insert "c\n")
(cancel-change-group g)))
#+end_src
if you comment the line including the `insert' call before the change
group is prepared the thing works as expected. So there is a problem
with this insertion (in the same command?) before preparing the group,
or this is actually not allowed but not documented accordingly.
Michael.
next prev parent reply other threads:[~2020-11-26 14:49 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
2020-11-26 14:16 ` Michael Heerdegen
2020-11-26 14:49 ` Michael Heerdegen [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87o8jkgoli.fsf@web.de \
--to=michael_heerdegen@web.de \
--cc=33341@debbugs.gnu.org \
--cc=larsi@gnus.org \
--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 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.