How do use emacs-state in certain modes?
Hello. I want to use emacs-state in term-mode and undo-tree-mode. How do I achieve that? I tried: (add-to-list 'evil-emacs-state-modes undo-tree-mode) This didn't work for some reason. So again, What should I do to be in emacs-state in term-mode for exmaple? Thanks for your time and kind concern.
[email protected] (jenia.ivlev) writes:
I want to use emacs-state in term-mode and undo-tree-mode. How do I achieve that? I tried: (add-to-list 'evil-emacs-state-modes undo-tree-mode)
This didn't work for some reason.
So again, What should I do to be in emacs-state in term-mode for exmaple?
You need to quote the name of the mode: (add-to-list 'evil-emacs-state-modes 'undo-tree-mode) _____________________________________^ Alternatively, you can switch to Emacs mode anytime with C-z.
Óscar Fuentes <[email protected]> writes:
[email protected] (jenia.ivlev) writes:
I want to use emacs-state in term-mode and undo-tree-mode. How do I achieve that? I tried: (add-to-list 'evil-emacs-state-modes undo-tree-mode)
This didn't work for some reason.
So again, What should I do to be in emacs-state in term-mode for exmaple?
You need to quote the name of the mode:
(add-to-list 'evil-emacs-state-modes 'undo-tree-mode) _____________________________________^
Alternatively, you can switch to Emacs mode anytime with C-z.
Oh, but undo-tree-mode is a minor mode. I think that evil-emacs-state-modes works for major modes only. And you don't want to use Emacs mode on all buffers where undo-tree-mode is active, do you? term-mode is a major mode, so (add-to-list 'evil-emacs-state-modes 'term-mode) should work.
Óscar Fuentes <[email protected]> writes:
Óscar Fuentes <[email protected]> writes:
[email protected] (jenia.ivlev) writes:
I want to use emacs-state in term-mode and undo-tree-mode. How do I achieve that? I tried: (add-to-list 'evil-emacs-state-modes undo-tree-mode)
This didn't work for some reason.
So again, What should I do to be in emacs-state in term-mode for exmaple?
You need to quote the name of the mode:
(add-to-list 'evil-emacs-state-modes 'undo-tree-mode) _____________________________________^
Alternatively, you can switch to Emacs mode anytime with C-z.
Oh, but undo-tree-mode is a minor mode. I think that evil-emacs-state-modes works for major modes only. And you don't want to use Emacs mode on all buffers where undo-tree-mode is active, do you?
term-mode is a major mode, so
(add-to-list 'evil-emacs-state-modes 'term-mode)
should work.
_______________________________________________ implementations-list mailing list [email protected] https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
Thanks for your help. Yes. undo-tree-mode is a minor mode. The major mode that I need to use emacs-state is undo-tree-visualizer-mode. But it doesnt work for that mode. So again, the major-mode I need to be in emacs-state is undo-tree-visualizer. It doesnt work though, for some reason. Maybe you can suggest something. P.S By the way, doing it for a minor mode -undo-tree-mode - worked, but too well sort of speak: any buffer that had that as a minor mode would start out in emacs-state.
[email protected] (jenia.ivlev) writes:
Thanks for your help. Yes. undo-tree-mode is a minor mode. The major mode that I need to use emacs-state is undo-tree-visualizer-mode. But it doesnt work for that mode.
So again, the major-mode I need to be in emacs-state is undo-tree-visualizer. It doesnt work though, for some reason. Maybe you can suggest something.
undo-tree-visualizer-mode comes listed in evil-motion-state-modes, which apparently takes precedence over evil-emacs-state-modes, so you need to remove undo-tree-visualizer-mode from there. Try this: (setq evil-motion-state-modes (delq 'undo-tree-visualizer-mode evil-motion-state-modes)) (add-to-list 'evil-emacs-state-modes 'undo-tree-visualizer-mode) [snip]
Wouldn't it be easier to use evil-set-initial-state? I would assume it handles stuff like evil-motion-state-modes overriding evil-emacs-state-modes automagically. Óscar Fuentes writes:
[email protected] (jenia.ivlev) writes:
Thanks for your help. Yes. undo-tree-mode is a minor mode. The major mode that I need to use emacs-state is undo-tree-visualizer-mode. But it doesnt work for that mode.
So again, the major-mode I need to be in emacs-state is undo-tree-visualizer. It doesnt work though, for some reason. Maybe you can suggest something.
undo-tree-visualizer-mode comes listed in evil-motion-state-modes, which apparently takes precedence over evil-emacs-state-modes, so you need to remove undo-tree-visualizer-mode from there. Try this:
(setq evil-motion-state-modes (delq 'undo-tree-visualizer-mode evil-motion-state-modes)) (add-to-list 'evil-emacs-state-modes 'undo-tree-visualizer-mode)
[snip]
_______________________________________________ implementations-list mailing list [email protected] https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
participants (3)
-
Allen Li -
jenia.ivlev@gmail.com -
Óscar Fuentes