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

From: Juri Linkov <[email-masked]>
Date: Thu, 27 Mar 2025 19:50:13 +0200

> But, here's another factor: The *Completions* buffer by default contains
> a help message explaining to users that they can use M-<up> and M-<down>
> to select completions.  There's no such message explaining to users that
> they can use C-b/C-f/C-n/C-p to move point.  So:
>
> - If the arrow keys move point, users can still figure out how to select
>   completions by reading the help text.
>
> - If the arrow keys select completions, users who don't know
>   C-b/C-f/C-n/C-p are basically helpless.  (This is sadly common at my
>   site, because most of our users use evil-mode and don't know
>   C-b/C-f/C-n/C-p)

When users need to move point with arrow keys, then they have
to close the completions window.  This is the purpose of
'minibuffer-visible-completions': to eliminate ambiguity
whether arrows/RET apply to the visible completions window,
or to the text in the minibuffer.

> Also, rebinding the arrow keys by default to select completions is
> probably an unacceptable behavior change.  But it's very possible to
> rebind RET to accept completions by default.  So even if we disregard
> the "novice user" argument, I still think we should investigate binding
> RET without rebinding the arrow keys.

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.

> I'm curious: Why do you prefer the :filter approach?  Does it avoid some
> problems that happened in the past?  It makes sense for the arrow keys,
> but if we are rebinding RET by default, :filter seems like an unusual
> thing to use.

:filter makes it easier to add conditional keybindings that share
the same condition.  I doubt if it would be possible to rebind RET
by default.  But need to try to see how it works.