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

From: Eli Zaretskii <[email-masked]>
Date: Sun, 08 Aug 2021 08:14:35 +0300

> Date: Sat, 7 Aug 2021 19:20:35 +0200 (CEST)
> From:  Visuwesh via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <[email-masked]>
> 
> 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".

You expected Emacs to ignore what you type?  Why?

What you type after TAB is used to narrow the list of candidates when
you type the next TAB, or continue typing after the first TAB
completed some of the name for you.  This is the intended behavior.