2

I've changed the keybinding C-s to save buffer, but when I'm writing code and autocomplete is visible, it rebinds this key to search for a pattern:

Hitting C-S when autocomplete is open

If I try to use C-h k to find out which function is bound to C-s, even with the autocomplete open, emacs tells me it's save buffer.

How can I find out what is overwriting the C-s keybinding, and how to avoid it?

I'm using GNU Emacs 24.5.1 on RHEL Linux, the active modes are Python Flymake AC.

1

I don't use auto-complete. But looking in (an old version of ) the source code I see this:

(defvar ac-completing-map
  (let ((map (make-sparse-keymap)))
     ...
     (define-key map "\C-s" 'ac-isearch)
  ....

So you probably just need to do something like this:

(define-key ac-completing-map "\C-s" nil)
(define-key ac-completing-map SOME-OTHER-KEY 'ac-isearch)

I'd also suggest that you send a bug report to the auto-complete maintainer, asking for an easy way to discover the keys during completion.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.