I don't like ido-find-file, which seems to be the default response to C-x C-f in my Emacs 23.1.1 installation on Centos. I tried to change it in my .emacs file:

(global-set-key (kbd "C-x C-f") 'find-file)

This doesn't change anything, at least in either text mode or lisp mode. What am I missing?

  • 2
    By default, C-x C-f does not run ido-find-file, not matter which version of Emacs. Maybe it's because you enable the ido-mode, and since the global keymap has the lowest priority, if C-x C-f is used in any non-global keymap (and the keymap is active), they will take effect, in this case, ido-mode's keymap already uses C-x C-f.
    – xuchunyang
    Commented Aug 27, 2020 at 12:16
  • Thanks very much. I forgot that I had loaded better-defaults, which enables ido-mode. Modifying better-defaults fixed my complaint; you explained why.
    – Steve
    Commented Aug 27, 2020 at 12:49
  • @Drew I've provided an answer, as I think keymap priority is an important thing to know.
    – xuchunyang
    Commented Aug 27, 2020 at 16:10

1 Answer 1


global-set-key does not work because the same key is already used in ido-mode's kaymap, which has a higher priority than the global keymap, and the global keymap has the lowest priority. The solution, as you already know, is to keep ido-mode off, so ido-mode's keymap will not be active.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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