Subject: Re: bug#43774: 27.1; fido-mode completion don't accept empty string nor matching substring

From: Protesilaos Stavrou <[email-masked]>
Date: Sun, 04 Oct 2020 10:18:34 +0300

On 2020-10-03, 09:30 +0300, Teemu Likonen <[email-masked]> wrote:

> Emacs fido-mode (which is part of icomplete-mode) implements minibuffer
> completion system which offers quick and easy way to choose one of the
> available options. However, sometimes user needs to enter a different
> substring which is not any of the available options. Sometimes even
> empty string is needed. This seems to be impossible in fido-mode. The
> following example demonstrates the empty string problem.
>
> [..]

Hi Teemu,

Try to use C-j (icomplete-force-complete-and-exit) to insert a substring
that is not part of the list of candidates.

A simple reproducible recipe (I am on Emacs 28.0.50):

+ Start 'emacs -Q'

+ In the scratch buffer first evaluate:

  (fido-mode 1)

+ Then evaluate:

  (insert
   (completing-read "Test arbitrary input: " '(one two three)))

+ Instead of selecting among {one,two,three} you can type any string,
  such as "test" and add it with C-j.  Your input shall be inserted at
  point.

This should work for a substring, but I am not sure it does for an empty
string.

-- 
Protesilaos Stavrou
protesilaos.com