Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unrecognized entry in undo list undo-tree-canary #9903

Closed
aaronjensen opened this issue Nov 23, 2017 · 12 comments
Closed

unrecognized entry in undo list undo-tree-canary #9903

aaronjensen opened this issue Nov 23, 2017 · 12 comments
Labels

Comments

@aaronjensen
Copy link
Contributor

@aaronjensen aaronjensen commented Nov 23, 2017

Description :octocat:

undo-tree often errors with unrecognized entry in undo list undo-tree-canary.

See: #298 #774
https://lists.gnu.org/archive/html/bug-gnu-emacs/2014-01/msg01106.html

From what I can tell, you can't exclude the package (adding it to
dotspacemacs-excluded-packages doesn't have any effect.)

For now, I'm using:

(global-undo-tree-mode -1)

Which reverts me back to the normal undo ring as far as I can tell.

Reproduction guide 🪲

  • Start Emacs
  • Use it regularly, undoing stuff and attempting to redo it.
  • Keep using it until you hit this issue.

Observed behaviour: 👀 💔

Undo breaks randomly and you lose work.

Expected behaviour: ❤️ 😄

Undo does not break.

System Info 💻

  • OS: darwin
  • Emacs: 26.0.90
  • Spacemacs: 0.300.0
  • Spacemacs branch: develop (rev. d475a1b)
  • Graphic display: t
  • Distribution: spacemacs
  • Editing style: hybrid
  • Completion: ivy
  • Layers:
(octave swift nginx better-defaults spacemacs-layouts ivy
        (markdown :variables markdown-live-preview-engine 'vmd)
        (syntax-checking :variables syntax-checking-enable-tooltips t)
        (auto-completion :variables auto-completion-enable-sort-by-usage t auto-completion-enable-snippets-in-popup nil spacemacs-default-company-backends
                         '(company-capf
                           (company-dabbrev-code company-keywords)
                           company-files company-dabbrev))
        git dash pdf-tools html
        (org :variables org-enable-github-support t org-enable-reveal-js-support t org-want-todo-bindings t)
        colors
        (osx :variables osx-command-as 'super)
        github
        (shell :variables shell-default-shell 'ansi-term shell-default-height 30 shell-default-position 'bottom)
        (spell-checking :variables spell-checking-enable-by-default nil)
        version-control rcirc tmux yaml docker restclient lua chrome
        (unicode-fonts :variables unicode-fonts-force-multi-color-on-mac t)
        emoji evil-little-word aj-elixir aj-emacs-lisp aj-javascript aj-typescript aj-ruby auto-correct cleverparens-lispy flow match-indent shift-number writing)
  • System configuration features: JPEG RSVG IMAGEMAGICK NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES LCMS2

Backtrace 🐾

<<BACKTRACE IF RELEVANT>>
@aaronjensen
Copy link
Contributor Author

@aaronjensen aaronjensen commented Nov 23, 2017

I'm trying out:

(setq undo-tree-enable-undo-in-region nil)

As it appears to be problematic: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=16377

That said, I don't have high hopes for this as there is a report of it still happening with that set.

If anything, maybe spacemacs should default to (setq undo-tree-enable-undo-in-region nil)

@aaronjensen aaronjensen changed the title undo-tree should be removed or replaced unrecognized entry in undo list undo-tree-canary Nov 23, 2017
@dds
Copy link

@dds dds commented Mar 17, 2019

I'm trying out:

(setq undo-tree-enable-undo-in-region nil)

As it appears to be problematic: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=16377

That said, I don't have high hopes for this as there is a report of it still happening with that set.

If anything, maybe spacemacs should default to (setq undo-tree-enable-undo-in-region nil)

Setting undo-tree-enable-undo-in-region nil has fixed the problem for me.

@xendk
Copy link

@xendk xendk commented Apr 5, 2019

Donno if this'll help, but I just noticed that the version of undo-tree in ELPA is 0.6.5 (https://elpa.gnu.org/packages/undo-tree.html) while the latest 0.6.6 from the maintainer (http://www.dr-qubit.org/undo-tree.html) has a commit adressing bug 16377. Might be worth a try.

@sollidsnake
Copy link

@sollidsnake sollidsnake commented Apr 6, 2019

@xendk nice catch! I tried for a few minutes and so far no error at all. Will keep trying for a week and will report back if it was fixed indeed.

@TheJJ
Copy link
Contributor

@TheJJ TheJJ commented Apr 6, 2019

Isn't that fix is already included in the elpa version? https://git.savannah.gnu.org/cgit/emacs/elpa.git/log/packages/undo-tree/undo-tree.el

There's https://git.savannah.gnu.org/cgit/emacs/elpa.git/commit/packages/undo-tree/undo-tree.el?id=cad55641128d5396f6c49c3f3432f22e68a8de39

The patch is not present though in my spacemacs, what do we need to do to bump it?

@duianto
Copy link
Collaborator

@duianto duianto commented Apr 6, 2019

Could the version number Current version (0.6.6) be a typo?
On http://www.dr-qubit.org/undo-tree.html

Because the link: http://www.dr-qubit.org/undo-tree/undo-tree.el
Shows a file with: ;; Version: 0.6.4

Spacemacs installs undo-tree using use-package undo-tree so it should be using the latest version.

I have updated the packages, and my version SPC h d p undo-tree RET shows:

     Status: Installed in ‘undo-tree-0.6.5/’ (unsigned).
    Version: 0.6.5

@xendk
Copy link

@xendk xendk commented Apr 6, 2019

Isn't that fix is already included in the elpa version?

While it seem's to be committed, I don't think that commit is included in the package until a new version is released.

Could the version number Current version (0.6.6) be a typo?

No, I've cloned from http://www.dr-qubit.org/git/undo-tree.git :
image

Spacemacs installs undo-tree using use-package undo-tree so it should be using the latest version.

I'm not using Spacemacs, but I guess use-package uses package.el which in turn fetches the version from ELPA without the fix.

The patch is not present though in my spacemacs, what do we need to do to bump it?

That's the pickle, there's no easy way.

As I said, I'm not using Spacemacs, but as I'm using straight.el, I can just point it at the maintainer version:

(use-package undo-tree
  :commands global-undo-tree-mode
  :demand
  :delight
  :init (global-undo-tree-mode)
  :bind (:map undo-tree-visualizer-mode-map
              ;; Make return accept currently selected revision and q
              ;; (and C-g) abort. The defaults are weird.
              ("<return>" . undo-tree-visualizer-quit)
              ("C-g" . undo-tree-visualizer-abort)
              ("q" . undo-tree-visualizer-abort))
  ;; Pull package directly from maintainer, the elpa package is behind.
  :straight (:type git :host nil :repo "http://www.dr-qubit.org/git/undo-tree.git"))

I don't know if Spacemacs has a method of pulling in a custom version of a package. Else, cloning from http://www.dr-qubit.org/git/undo-tree.git and pointing use-package to it with :load-path should work.

@yuhan0
Copy link
Contributor

@yuhan0 yuhan0 commented Apr 7, 2019

I don't know if Spacemacs has a method of pulling in a custom version of a package.

This should do it:

(undo-tree :location (recipe
                      :fetcher git
                      :url "http://www.dr-qubit.org/git/undo-tree.git"
                      :branch "master"))

in the declaration of spacemacs-editing-packages in the file layers/+spacemacs/spacemacs-editing/packages.el

@sollidsnake
Copy link

@sollidsnake sollidsnake commented Apr 15, 2019

I tried this newer version but I still got the error. I looked at the diffs from 1.6.5 and 1.6.6 and doesn't seem to have any change related to this issue, unfortunately.

@ideasman42
Copy link

@ideasman42 ideasman42 commented Feb 7, 2020

Suggesting a lightweight alternative to undo-tree. Undo-fu uses emacs built-in undo, adding undo-redo behavior, without removing access to the full undo stack if that's needed.

@duianto duianto added the Undo label Feb 9, 2020
@duianto
Copy link
Collaborator

@duianto duianto commented Feb 9, 2020

@ideasman42 Did you encounter this issue with a recent undo-tree version or was the comment just a suggestion for an alternative?

There has been some recent updates to the undo-tree package,
https://elpa.gnu.org/packages/undo-tree.html

Latest undo-tree-0.7.4.el, 2020-Jan-29, 181 KiB

And the undo limits have been increased in Spacemacs (Aug 21, 2019):
Bump undo limits to avoid frequent No further undo information dcb4da0

since the previous comment by sollidsnake about encountering the issue (Apr 15, 2019).

The suggestion to increase the undo limits was discussed in this thread:
No further undo information #12110

Maybe those changes have improved things.

@aaronjensen
Copy link
Contributor Author

@aaronjensen aaronjensen commented Feb 9, 2020

I believe they have. Since I'm the original opener of this, I'm going to go ahead and close it. It's fixed upstream.

@aaronjensen aaronjensen closed this Feb 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
8 participants