I have a function bound to
Ctrl-b, this runs a command immediately, however after some time running emacs, pressing this binding shows text
C-b in the message bar, prompting for other keys to be pressed.
If I press Enter, it runs the command, otherwise it keeps accepting key and mouse input.
C-h k still shows up this key binding as being associated with the function I expect it to run.
How to troubleshoot emacs expecting further input for a key binding?
Edit: the command (which I wasn't sure if it was important) is to build.
(defun generic-build () (interactive) (cond ((string= major-mode "c-mode") (call-interactively 'cmake-ide-compile)) ((string= major-mode "c++-mode") (call-interactively 'cmake-ide-compile)) ) ) (global-set-key (kbd "C-b") 'generic-build) (eval-after-load "evil-maps" (define-key evil-motion-state-map "\C-b" nil))
This happens if I try to exit too, Pressing
Ctrk-b, Ctrl-h shows this message.
This would have to be related to my configuration, the issue just never came up until recently.
Type SPC or ‘y’ to save the current buffer; DEL or ‘n’ to skip the current buffer; RET or ‘q’ to give up on the save (skip all remaining buffers); C-g to quit (cancel the whole command); ! to save all remaining buffers; C-r to view this buffer; d to view changes in this buffer; or . (period) to save the current buffer and exit.
(setq use-dialog-box nil)
Which has been working up until now.
emacs -Q, then setting
(setq use-dialog-box nil) still prompts for file save.
Found the root cause, posting in answer since its confusing to include here.
C-b C-hto see which bindings were using that prefix; however that does not match your description. Please update the question with details of the specific function in question. My best guess is that this is actually expected behaviour.
emacs -Q(no init file), and then define your command and bind it to the key? If not, bisect your init file to find the culprit.
C-b ?will tell you what bindings are available. Some of those bindings must have overwritten your original one.