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

From: Visuwesh <[email-masked]>
Date: Tue, 10 Aug 2021 11:00:59 +0200 (CEST)

10 Aug 2021, 12:37 by [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".
>>
>
> The same problem was reported in https://debbugs.gnu.org/34517#14
> that also contains a possible solution, still unimplemented.
>
Thanks for linking me that bug report.  I tried searching for similar terms in 
bug-gnu-emacs and emacs-devel but the hits were too much for me to go
through them.  Stefan's explanation made things clear.