I just started using ido-mode and can't seem to get it to give a buffer list on switch-buffer. It works fine for visit file (C-x C-f) and kill buffer (C-x k), but not on C-x b, which is a much more common event. I've just updated to Emacs 24.4.1 (i686-pc-mingw32), but that didn't solve the problem.

| improve this question | | | | |
  • How are you activating it? – Malabarba Dec 4 '14 at 21:37
  • 2
    To what function is C-x b bound? (Do C-h k C-x b) – Dan Dec 5 '14 at 3:03
  • I am activating ido by typing M-x ido-mode. C-x b is bound to s-switch-to-buffer. Ah, now I see the problem. s-switch-to-buffer has been in my .emacs for longer than I can remember. I removed this and now it works. Thanks. – Llaves Dec 5 '14 at 23:44
  • 1
    @Llaves: please submit an answer and accept it so that other users will know that the problem is solved. – Dan Dec 5 '14 at 23:53

To activate ido mode, put this in your init file:

;; make buffer switch command auto suggestions, also for find-file command
(ido-mode 1)

Then, C-x b will call the ido version of switch buffer function, and you can press tab key for completion

Putting this in your init file, may be interesting:

;; make ido display choices vertically
(setq ido-separator "\n")

;; display any item that contains the chars you typed
(setq ido-enable-flex-matching t)


With the setup above, everything should work as expected. If the TAB key is not working as expected, try with the SPC key to check. Not sure, but you may have a minor mode active with a keymap overriding some keybinding of ido.

| improve this answer | | | | |
  • 1
    that's not it. You will note in my original question that ido is working for other functions, just not for switch buffers. Thus, I do have the mode enabled. – Llaves Dec 5 '14 at 2:17

Make sure that C-x b is bound to ido-switch-buffer, not to something else. You can check what it is currently bound to by running M-x describe-key <RET> C-x b.

| improve this answer | | | | |

my .emacs file remapped C-x b to a function called s-switch-to-buffer, which probably got added back in the lisp machine days and I had completely forgotten it was there. Once I removed that, everything behaved as expected. Thanks to Dan for prompting to look at the key-binding.

| improve this answer | | | | |

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.