Subject: bug#43222: 28.0.50; fido-mode selects wrong buffer to kill when no input

From: João Távora <[email-masked]>
Date: Sun, 06 Sep 2020 08:03:59 +0100

Sean Whitton <[email-masked]> writes:

> This is orthogonal to #43120 so far as I can tell.
>
> 1. emacs -q
> 2. M-x fido-mode RET
> 3. C-x C-f ~/src/emacs/lisp/icomplete.el RET
> 4. M-: (find-file (locate-library "icomplete.el.gz")) RET
> 5. C-x b icomplete.el RET
> 6. C-x k [wait for completions] RET|M-j

Followed your report and confirmed it.  Notice that the problem only
happens because the file names share a common prefix: "icomplete.el"

Maybe the title (and the severity) of this bug should be changed to
reflect that.  Do you know how to do that, Lars?

> The first completion offered by fido-mode is different from the
> default value shown in the minibuffer prompt.

This sentence indeed describes it.  There code is fido-mode to "bubble"
up the default to the first result, but it isn't working for some
reason.  I'd say the problem lies somewhere in
icomplete--sorted-completions.

João