Subject: bug#49931: 28.0.50; `choose-completion' submits incorrect string when minibuffer content changes after creation of the *Completions* buffer

From: Juri Linkov <[email-masked]>
Date: Tue, 10 Aug 2021 10:07:25 +0300

> When one edits the minibuffer content after the creation of
> *Completions* buffer, `choose-completion' incorrectly submits the wrong
> string to the command upon selecting a candidate.  To reproduce,
>
> 1. Start emacs -Q.
> 2. Type the following key sequence: C-h f emacs- TAB.
> 3. Type a.
> 4. Select `emacs-bzr-get-version' from the *Completions* buffer.
> 5. "user-error: Symbol’s function definition is void:
> emacs-bzr-get-versiona" is shown in the echo area.
>
> What I expected to happen:
>
> I expected `choose-completion' to submit "emacs-bzr-get-version" to
> describe-function, not "emacs-bzr-get-versiona".

The same problem was reported in https://debbugs.gnu.org/34517#14
that also contains a possible solution, still unimplemented.