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

Doesn't play well with evil-snipe #2275

Closed
NightMachinery opened this issue Apr 23, 2018 · 8 comments
Closed

Doesn't play well with evil-snipe #2275

NightMachinery opened this issue Apr 23, 2018 · 8 comments

Comments

@NightMachinery
Copy link

NightMachinery commented Apr 23, 2018

evil-snipe overrides 's', and so 's' doesn't activate stacktrace when debugging.

@bbatsov
Copy link
Member

bbatsov commented Apr 23, 2018

That's not really a CIDER issue. evil-snipe (and similar modes) should be careful with what their binding/changing in special modes.

@NightMachinery
Copy link
Author

@bbatsov What can be done to fix the issue, presumably on evil-snipe's side?

@NightMachinery
Copy link
Author

@bbatsov I tested edebug, and it had no issues with evil-snipe ('s' ran edebug-step-mode when edebug was active.).

@NightMachinery
Copy link
Author

NightMachinery commented Apr 24, 2018

@bbatsov From evil-snipe:
I'm not familiar with CIDER's debugger, but you can prevent evil-snipe from being enabled in certain major modes by adding it to evil-snipe-disabled-modes, or by adding turn-off-evil-snipe-mode to the appropriate hook. e.g.

;; NOTE: I'm guessing the major mode and hook names
(push 'cider-debug-mode evil-snipe-disabled-modes)
;; or
(add-hook 'cider-debug-mode-hook #'turn-off-evil-snipe-mode)

If you tell me what the appropriate major-mode is, I'll be happy to add it to evil-snipe-disabled-modes's default.

@bbatsov
Copy link
Member

bbatsov commented Apr 24, 2018

It's a minor mode actually - cider--debug-mode.

@NightMachinery
Copy link
Author

NightMachinery commented Apr 25, 2018

The hook cider--debug-mode-hook runs both when entering and leaving debug mode. How do I differentiate between these two to disable/enable evil-snipe?

@NightMachinery
Copy link
Author

NightMachinery commented Apr 25, 2018

Nevermind, I found the answer:

(add-hook 'cider--debug-mode-hook (lambda ()
                                      (if (bound-and-true-p cider--debug-mode)
                                          (turn-off-evil-snipe-mode)
                                        (turn-on-evil-snipe-mode))))

@bbatsov
Copy link
Member

bbatsov commented Apr 25, 2018

Great! Guess we can close this then.

@bbatsov bbatsov closed this as completed Apr 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants