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

edebug-mode-map can't take effect for the first time #432

Open
TheBB opened this issue Oct 12, 2014 · 5 comments
Open

edebug-mode-map can't take effect for the first time #432

TheBB opened this issue Oct 12, 2014 · 5 comments

Comments

@TheBB
Copy link
Member

TheBB commented Oct 12, 2014

Originally reported by: Shihpin Tseng (Bitbucket: Shihpin, GitHub: Shihpin)


After emacs boot completed (evil-state is normal).
'C-u C-M-x' function 'foo' then do 'C-x C e' after '(foo)' to enter edebug-mode.
'n' is binded to `evil-search-next'.
'Q' quit and execute (foo) again
this time 'n' is binded to 'edebug-next-mode'


@TheBB
Copy link
Member Author

TheBB commented Oct 14, 2014

Original comment by Frank Fischer (Bitbucket: lyro, GitHub: lyro):


This is something I'm very well aware, I just do not have a solution. The problem is that Evil's decides how to chain keymaps when the state is changed based on the set of other keymaps being active at this point (here edebug-mode-map). However, in some cases it may happen that edebug mode is enabled after Evil changes its state, and then Evil does not chain the keymaps correctly.

In an ideal world there would be some kind of hook to be called whenever the list of active keymaps changes so that Evil can update its chain of keymaps. However, AFAIK there is no such hook so I do not know how to solve the problem.

@TheBB
Copy link
Member Author

TheBB commented Oct 15, 2014

Original comment by Shihpin Tseng (Bitbucket: Shihpin, GitHub: Shihpin):


Can we update the Evil keymap chain by add a hook to edebug-mode-hook?

For now, I tentative change evil state to 'emacs' when edebug-mode on and revert back when it turn off.

@TheBB
Copy link
Member Author

TheBB commented Oct 20, 2014

Original comment by Frank Fischer (Bitbucket: lyro, GitHub: lyro):


Indeed, you could try (add-hook 'edebug-mode-hook 'evil-normalize-keymaps).

@TheBB
Copy link
Member Author

TheBB commented Oct 20, 2014

Original comment by Shihpin Tseng (Bitbucket: Shihpin, GitHub: Shihpin):


It works, thanks.

@TheBB
Copy link
Member Author

TheBB commented Nov 24, 2014

Original comment by Frank Fischer (Bitbucket: lyro, GitHub: lyro):


Issue #452 was marked as a duplicate of this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant