From: Toby Cubitt <tsc25@cantab.net>
To: Barry OReilly <gundaetiapo@gmail.com>
Cc: 16377@debbugs.gnu.org
Subject: bug#16377: Undo Tree regression: (error "Unrecognized entry in undo list undo-tree-canary")
Date: Tue, 7 Jan 2014 04:14:42 +0000 [thread overview]
Message-ID: <20140107041442.GA12172@c3po> (raw)
In-Reply-To: <CAFM41H1VcYe=_nj3s1et+JKWNmgjkrsQN=XoT8KzCofHHToivw@mail.gmail.com>
Hi Barry,
Thanks for the bug report and recipe.
On Mon, Jan 06, 2014 at 07:32:45PM -0500, Barry OReilly wrote:
> Don't know yet if the code change belongs in Undo Tree or Emacs but
> the recipe is:
>
> • Start Emacs in scratch buffer with global-undo-tree-mode enabled
> • Go to BOB and insert "xxx"
> • Select first line
> • undo-tree-undo in region
> • undo-tree-redo in region
> • undo-tree-visualize
> • Navigate down (redo)*
> • Navigate up (undo)
>
> Upon the navigate up, this error occurs:
>
> Debugger entered--Lisp error: (error "Unrecognized entry in undo list
> undo-tree-canary")
> signal(error ("Unrecognized entry in undo list undo-tree-canary"))
> error("Unrecognized entry in undo list %S" undo-tree-canary)
> primitive-undo(1 (undo-tree-canary))
> undo-tree-undo-1(1)
> undo-tree-visualize-undo(1)
> call-interactively(undo-tree-visualize-undo nil nil)
> command-execute(undo-tree-visualize-undo)
I also can't reproduce this in current stable Emacs. (Which is odd, as my
first guess from the backtrace would have been that this is a bug in the
relatively untested undo-tree undo-in-region code, and nothing to do with
Emacs.)
> * Sometimes the navigate down hangs with backtrace:
>
> Debugger entered--Lisp error: (quit)
> undo-tree-copy-list((nil))
> undo-tree-redo-1(1)
> undo-tree-visualize-redo(1)
> call-interactively(undo-tree-visualize-redo nil nil)
> command-execute(undo-tree-visualize-redo)
>
> Don't know if it's related or not.
>
> This recipe does not cause a problem with Emacs 24.3.
Confirmed.
> The following commit is suspicious:
>
> commit 0c180ea96c022923ef18a255d0492bdb5ad04e02
> Author: Aaron S. Hawley <aaron.s.hawley@gmail.com>
> Date: Tue Jan 8 14:13:31 2013 -0500
>
> * lisp/simple.el (primitive-undo): Move from undo.c.
> * src/undo.c (Fprimitive_undo): Move to simple.el.
> (syms_of_undo): Remove declaration for Sprimitive_undo.
> * test/automated/undo-tests.el: New file.
>
> The commit moved primitive-undo from C to Elisp. In the process, it
> added an else condition not present in the C code:
>
> + (t (error "Unrecognized entry in undo list %S" next)))))
OK, who messed with `primitive-undo' without making absolutely sure the
elisp implementation was strictly identical to the aeons-old c
implementation, and can I shoot them please? ;-)
Seriously, from the backtrace, the error does seem to be thrown by the
new test. Whether that's an Emacs regression, or just that the new test
is catching an existing bug in undo-tree, is harder to tell.
I'll play around with it in a fresh vcs Emacs when I have some time. In
the meantime, since this *is* a regression of sorts(*), can you bisect to
confirm this is the commit that broke things?
(*) I'd hope that a key requirement of moving `primitive-undo' to elisp
is surely that it not introduce changes in behaviour.
> The consequence of this bug is that when using Undo Tree, recent undo
> history can become completely inaccessible.
>
> I should note that if I don't undo in region, Undo Tree has never run
> into any problems with the Emacs on trunk.
Have you hit other reproducible undo-in-region bugs on trunk? If so,
please report them! The undo-tree undo-in-region code is fiendishly
complex, hard to test, and under-tested.
Best,
Toby
PS: Sorry if I've broken threading on bug-gnu-emacs and generated a new
bug number. I have delivery disabled currently as I don't have time to
follow it. But it seems worth copying my reply there.
--
Dr T. S. Cubitt
Royal Society University Research Fellow
and Fellow of Churchill College, Cambridge
Centre for Quantum Information
DAMTP, University of Cambridge
email: tsc25@cantab.net
web: www.dr-qubit.org
next prev parent reply other threads:[~2014-01-07 4:14 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-07 0:32 bug#16377: Undo Tree regression: (error "Unrecognized entry in undo list undo-tree-canary") Barry OReilly
2014-01-07 4:14 ` Toby Cubitt [this message]
2014-01-22 3:23 ` Barry OReilly
2014-01-22 17:08 ` bug#16523: " Toby Cubitt
2014-01-08 3:37 ` bug#16377: " Toby Cubitt
2014-01-22 0:05 ` Barry OReilly
[not found] ` <20140122141701.GA6728@c3po>
2014-01-22 15:26 ` Barry OReilly
2014-01-22 17:05 ` Toby Cubitt
2014-01-22 18:56 ` Stefan Monnier
2014-01-22 21:30 ` Toby Cubitt
2017-07-06 0:33 ` Keith David Bershatsky
2017-07-06 5:01 ` Keith David Bershatsky
2017-07-06 5:35 ` Stefan Monnier
2017-07-06 6:25 ` Keith David Bershatsky
2017-07-06 9:02 ` Toby Cubitt
2017-07-06 9:47 ` Toby Cubitt
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=20140107041442.GA12172@c3po \
--to=tsc25@cantab.net \
--cc=16377@debbugs.gnu.org \
--cc=gundaetiapo@gmail.com \
--cc=toby-dated-1390277686.3b79b1@dr-qubit.org \
/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.