Subject: bug#77253: 30.1.50; Support RET choosing the selected completion without rebinding arrow keys

From: Juri Linkov <[email-masked]>
Date: Fri, 28 Mar 2025 09:20:43 +0200

> - It's not necessarily obvious that closing the completions window will
>   make the arrow keys operate in the minibuffer.  Actually, maybe we
>   should update the completion help text to say that?  That might help a
>   lot.

Maybe it's possible to squeeze this help text just into one additional line?
Something like:

  Type 'C-g' to close this window and restore arrows to move point.

> - The new completion-eager-display makes *Completions* pop up
>   immediately; when this happens, it can be surprising that the arrow
>   keys don't work in the minibuffer from the very start of the
>   minibuffer session.

Then another possible value for 'minibuffer-visible-completions'
would be to not rebind left/right arrows when the completions window
contains only one column (like on the browser's address bar).

>> Not sure if it's possible for RET to accept the selected candidate
>> by default since users might prefer to accept text in the minibuffer.
>
> If there's a selected candidate, though, then users have already decided
> to use M-<up>/M-<down> to interact with completions.  (Or they've
> switched to the completions buffer and selected one)
>
> If they decide they don't want the candidate they selected, and want to
> continue with text in the minibuffer, completion-auto-deselect will
> automatically deselect the candidate if they type anything.
>
> I think these two facts combined make it possible for RET to accept the
> selected candidate by default.

Makes sense.  So we need to try how well it performs.