1

When switching buffers with emacs ido mode enabled, a list of completions are displayed in the minibuffer. It appears there is a "feature" that buffers that are already open are put to the end of the list. I, however, often open the same buffer in multiple panes.

Is there a way to either turn this "feature" off, or alternatively do the opposite: have the buffers that are already open be at the front of the completion list?

momeara
  • 1,341
  • 2
  • 17
  • 29

2 Answers2

1

The main point of ido mode is that you don't use arrows to navigate between buffers in the minibuffer. Instead you type the part of the buffer's name. In this case it doesn't matter where the buffer is in the list.

eGlyph
  • 1,117
  • 6
  • 11
  • When multiple buffers have a common prefix, then the order they are listed determines how many C-s's it takes to get to a specific buffer. So the order does matter. – momeara Sep 06 '11 at 14:16
  • you can type any part of the buffer name. if you have buffers names like test_feat_a.py, test_feat_b.py, etc. then you have to type just the unique part of the name, `_a` or `_b` in this case. – eGlyph Sep 06 '11 at 17:50
0

This is not possible unless you want to wade deep in ido's intestines.

As eGlyph already said: You're likely using ido wrongly (and there's also C-s for <right> and C-r for <left>; no need for arrow keys).

But you can define command for choosing among the already shown buffers (here only from the current frame, if you want all shown buffers you have to collect the windows first via `frame-list):

(defun choose-from-shown-buffers ()
  (interactive)
  (let ((buffers (mapcar (lambda (window)
                            (buffer-name (window-buffer window)))
                         (window-list))))
      (pop-to-buffer (ido-completing-read "Buffer: " buffers))))
Michael Markert
  • 3,986
  • 2
  • 19
  • 19