-
Notifications
You must be signed in to change notification settings - Fork 284
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
u
and C-r
doesn't work in new buffer with undo-tree as evil-undo-system
#1382
Comments
Additionally, this happens simply because |
The PR that introduced this change removed this integration code: (when (and (require 'undo-tree nil t)
(fboundp 'global-undo-tree-mode))
(global-undo-tree-mode 1))
(eval-after-load 'undo-tree
'(with-no-warnings
(defun evil-turn-on-undo-tree-mode ()
"Enable `undo-tree-mode' if evil is enabled.
This function enables `undo-tree-mode' when Evil is activated in
some buffer, but only if `global-undo-tree-mode' is also
activated."
(when (and (boundp 'global-undo-tree-mode)
global-undo-tree-mode)
(turn-on-undo-tree-mode)))
(add-hook 'evil-local-mode-hook #'evil-turn-on-undo-tree-mode))) Could you please test whether adding that code to your repro resolves the issue? Alternatively this simplified version: (global-undo-tree-mode)
(add-hook 'evil-local-mode-hook 'turn-on-undo-tree-mode) |
@wasamasa Thank you for your opinion. I tested both code and both fixed the issue. Actually I've been temporarily using the second code for this issue in my configuration. I thought it's temporal solution because now evil-mode use 'evil-undo-system' and this direct setting could be object to new 'evil-undo-system'. Anyway both version fix my issue. I hope this result could be helpful. Thank you again. |
Issue type
Environment
Emacs version: GNU Emacs 27.1
Operating System: Arch linux
Evil version: Evil version 1.14.0
Evil installation type: MELPA
Graphical/Terminal: Both
Tested in a
make emacs
session (see CONTRIBUTING.md): NoReproduction steps
2-1.
u
andC-r
works fine in scratch buffer2-2.
Open any file
u
andC-r
works fine.2-3.
Open new buffer by
C-x b test-buffer
u
andC-r
doesn't work with message "user-error: Enable ‘global-undo-tree-mode’ to use undo-tree commands."Expected behavior
u
andC-r
should work in new buffer too.Actual behavior
u
andC-r
doesn't work with message "user-error: Enable ‘global-undo-tree-mode’ to use undo-tree commands."Further notes
This seems happening only when using undo-tree as evil-undo-system. (undo-tree version : 0.7.5)
This wasn't reproduced when tested in
make emacs
session.This is happening only in new buffer.
Since this isn't reproduced in
make emacs
session, I looked into this quite for a while but couldn't figure it out.I apologize in advance if it's a configuration issue, not a bug.
Thanks.
The text was updated successfully, but these errors were encountered: