On Wed, Sep 9, 2020 at 8:54 PM João Távora <joaotavora@gmail.com> wrote:
On Wed, Sep 9, 2020 at 8:52 PM Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>>> Nope, sorry. You're right. It should read minibuffer-complete-and-exit there
>>> of course.
>> IIRC this depends on whether the completion is `require-match` or not.
> If so, shouldn't minibuffer-complete-and-exit take care of that?

Yes and no: IIRC depending on `require-match`, RET is bound either
to `minibuffer-complete-and-exit` or to `exit-minibuffer`.

Bah, so the remap you suggested wouldn't work anyway.  What to do?
The good 'ol :filter trick? How does it go again?

Alternatively (and a bit sillily), two remaps for two different commands:
one for exit-minibuffer and one for minibuffer-complete-and-exit.  Or
check minibuffer-require-match which was recently added. Pick your
poison.

João