-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
realgud:gdb overshadows comint mode bindings #255
Comments
I don't think anyone gave that much thought. And clearly the fact that this is the first time anyone has mentioned it in the 10 years the project has been around suggests it's not been that big a deal. (Perhaps part of that is because it hasn't been used as much). Make a suggestion of how this should work, or better put in a pull request and if it's reasonable we'll do. |
Well shouldn't any minor mode normally add bindings to it's own keymap (which is then accessible while the mode is active) instead of replacing the major modes bindings with it's own map? I was under the impression that's how modes were supposed to work. though if you feel this doesn't warrant much of a change, then I'd appreciate if we could include a post in the wiki mentioning that comint binding don't work in realgud sessions (just to assist others who were as baffled as I was). |
The wiki anyone an add to, so feel free to put something there. Or create its own keymap etc. |
kay, I will, thnx 😄 |
I have that problem since upgrading to emacs 27. Before that I can confirm that the 75a6e60 (I assume it's in 20200923.610 from melpa) does not fix this (it also seems related to the source buffer, not the pdb buffer but maybe I'm misreading it). Confusingly,
|
I'm not clear on how to accomplish that. [...]
[...]
I don't see anything in the wiki either. |
Whoops @TauPan, I installed realgud but then promptly never ended up using it so this issue kind of slipped my mind. Here's what I meant:
|
Hm... I was wondering why it used to work and I'm one of those guys who update emacs packages very infrequently. I found the following commit to be relevant: 62f7eb5 In fact I see that it makes sense to use So it looks like I was using an over 6 year old version of realgud for a very long time and updated after the emacs 27 update (possibly because of other issues). Don't know how to properly fix this, since I'm not using bashdb at all. |
Nah, reverting this locally doesn't help. What also doesn't help is to copy the realgud-track-mode-map in the local track-mode-maps via |
For my use-case (pdb) the following works: (defun +comint-set-bindings (keymap)
;; abstracted into a method because realgud seems
;; to hide all of these bindings.
(bind-key "M-p" #'comint-previous-input keymap)
(bind-key "M-n" #'comint-next-input keymap))
(with-eval-after-load 'realgud
(+comint-set-bindings realgud-track-mode-map)
(+comint-set-bindings realgud-backtrace-mode-map)) |
I've found that
realgud:gdb
seems to be locally resetting my comint mode bindings withrealgud:gdb-track-mode-map
. To reproduce:emacs -q
M-x realgud:gdb
and run it on the compiled executeable.M-x describe-bindings
For me it's been reduced to:
Is this the intended behaviour? I couldn't find any mention of this in the wiki or README and seeing as the actual major mode of the gdb buffer (as found through
M-: major-mode
) is stillcomint-mode
this is actually a pretty pesky bug to hunt down.Update: wrapping my comint bindings into a method (such that I can pass which keymap I want them bound to manually) & doing so to
realgud:gdb-track-mode-map
has restored my bindings. I still feel this qualifies as a bug, unless this is how its supposed to work? 😄.The text was updated successfully, but these errors were encountered: