GNU bug report logs -
#26061
26.0.50; cancel-change-group fails with "unrelated state" error if used after an undo
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 26061 in the body.
You can then email your comments to 26061 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#26061
; Package
emacs
.
(Sat, 11 Mar 2017 18:02:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Andreas Politz <politza <at> hochschule-trier.de>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sat, 11 Mar 2017 18:02:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Save the following in some file foo.el:
#+BEGIN_SRC emacs-lisp
(defun bug ()
(interactive)
(catch 'done
(atomic-change-group
(insert "bug")
(throw 'done nil))))
(setq debug-on-error t)
(switch-to-buffer (get-buffer-create "*bug*"))
(setq unread-command-events
(list
;; insert abc
?a ?b ?c
;; undo once
?\C-/
;; call bug
?\M-x ?b ?u ?g ?\C-j))
#+END_SRC
, then start Emacs like this:
$ emacs -Q -l foo.el
Debugger entered--Lisp error: (error "Undoing to some unrelated state")
signal(error ("Undoing to some unrelated state"))
error("Undoing to some unrelated state")
cancel-change-group(((#<buffer *bug*> nil)))
--
-ap
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#26061
; Package
emacs
.
(Thu, 21 Nov 2019 09:54:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 26061 <at> debbugs.gnu.org (full text, mbox):
This seems to be a candidate to merge with 26287 and 34405,
the latter two being already merged.
All three bugs have similar Lisp code
(catch ... (atomic-change-group ... (throw ...)))
producing an "unrelated state" error after undo.
Best wishes,
Gábor
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#26061
; Package
emacs
.
(Thu, 21 Nov 2019 11:48:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 26061 <at> debbugs.gnu.org (full text, mbox):
Braun Gábor <braungb88 <at> gmail.com> writes:
> This seems to be a candidate to merge with 26287 and 34405,
> the latter two being already merged.
>
> All three bugs have similar Lisp code
> (catch ... (atomic-change-group ... (throw ...)))
> producing an "unrelated state" error after undo.
Yup; I've merged the bugs now.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Forcibly Merged 26061 26287 34405.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Thu, 21 Nov 2019 11:48:04 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#26061
; Package
emacs
.
(Sat, 14 Aug 2021 13:59:01 GMT)
Full text and
rfc822 format available.
Message #16 received at 26061 <at> debbugs.gnu.org (full text, mbox):
Braun Gábor <braungb88 <at> gmail.com> writes:
> -------------------- File test.el ----------------------------------
> ;; -*- lexical-binding: t; -*-
> (defun test-fun ()
> "Test atomic change group, no visible effect."
> (interactive)
> (catch 'test
> (atomic-change-group
> (save-excursion
> (goto-char (point-min))
> (insert "!!! TEST: you shouldn't see this !!!")
> (throw 'test t)))))
>
> (global-set-key [(control c) ?a] #'test-fun)
> --------------------------------------------------------------------
>
> Start emacs by the command
>
> emacs -Q -l test.el
>
> Press the following keys: a C-_ C-c a
>
> A "!!! TEST: you shouldn't see this !!!" gets inserted at the top of
> buffer *scratch*, and the message "Undoing to some unrelated state"
> appears in the echo area.
I can reproduce this problem in Emacs 26.1, but it seems to be gone in
Emacs 27.1 (and 28), so I'm going to go ahead and guess that this has
been fixed in the years since this was reported, and I'm closing this
bug report. If this is still a problem in recent Emacs versions, please
respond to the debbugs address and we'll reopen.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
bug closed, send any further explanations to
26061 <at> debbugs.gnu.org and Andreas Politz <politza <at> hochschule-trier.de>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Sat, 14 Aug 2021 14:00:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#26061
; Package
emacs
.
(Mon, 16 Aug 2021 12:02:02 GMT)
Full text and
rfc822 format available.
Message #21 received at 26061 <at> debbugs.gnu.org (full text, mbox):
> I can reproduce this problem in Emacs 26.1, but it seems to be gone in
> Emacs 27.1 (and 28), so I'm going to go ahead and guess that this has
> been fixed
I can see the fix in the following snippet of `cancel-change-group' in
Emacs 27.1 code. The faulty logic with `last-command' and `undo-start'
has been gone. (... denotes omitted code.)
(let (...
;; Use `pending-undo-list' temporarily since `undo-more' needs
;; it, but restore it afterwards so as not to mess with an
;; ongoing sequence of `undo's.
(pending-undo-list
;; Use `buffer-undo-list' unconditionally (bug#39680).
buffer-undo-list))
Thank you for checking in recent Emacs versions.
Best wishes,
Gábor
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 14 Sep 2021 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 224 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.