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

Open
aaronjensen opened this issue Nov 23, 2017 · 9 comments

Comments

Projects
None yet
7 participants
@aaronjensen
Copy link
Contributor

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

This comment has been minimized.

Copy link
Contributor Author

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link
Collaborator

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.