Key Binding and Function to Jump to Emacs Completions Buffer
Updated with a second solution. Both are useful. The new one is simpler.
I have recently disabled Ivy/Counsel/Swiper in my Emacs setup1.
One of the first things that I experienced, after disabling Ivy & friends, was a new interaction mode with completions.
When trying to complete something in the minibuffer, completion candidates are displayed in the *Completions* buffer which is conveniently displayed right above the minibuffer.
What confused me about this behavior was the need
to use the mouse to move to this buffer.
Using other-window
(C-x o
) wasn’t working
as it moved the point to the top buffer.
First reaction was: “This is Emacs. There’s a function for everything. I can create my own binding”
I have found the pop-to-buffer
function
which takes a buffer or buffer name.
Problem solved!
But then, the second reaction was: “This is Emacs. There is a function for everything. There must be a function for jumping to completions as this is such a core behavior”.
And, not surprisingly, there’s both such a function and binding:
M-v
, bound to switch-to-completions
, moves the point
from the minibuffer to the first completion
in the *Completions* buffer.
Now this really solved my question.
Update: thanks to éric, I have learned about an even better option!
There is a variable completion-auto-select
which when set to non-nil value,
make the point automatically move to the *Completions* buffer
when hitting TAB
.
The variable defaults to nil
,
so you’ll need to update it.
The reasons for disabling these are not that interesting. I have run into an issue related to Ivy. I used that as a justification for experiencing Emacs as is. ↩︎