Subject: Re: bug#60411: 29.0.60; minibuffer-next-completion skips first candidate when completions-header-format and completion-show-help are nil

From: Knut Anders Hatlen <[email-masked]>
Date: Sat, 31 Dec 2022 07:27:15 +0100

Gregory Heytings <[email-masked]> writes:

>>
>> 1. Evaluate: (setopt completions-header-format nil
>> completion-show-help nil)
>>
>> 2. Type M-x followed by TAB. The *Completions* buffer pops up and
>> shows all available commands.
>>
>> 3. Type M-<down>.
>>
>> Expected result: The first candidate in *Completions* is selected.
>>
>> Actual result: The second candidate in *Completions* is selected.
>>
>
> Thanks for your bug report.
>
> I attach a patch to fix that bug, can you please try it?
>
> It's a workaround, but it's the cleanest fix I can think of.

This seems to work. Thanks!

For completeness, you may consider also handling the case where
completions-header-format is an empty string, which is another not too
unreasonable way to disable the header. minibuffer-next-completion still
skips the first candidate for that case.

-- 
Knut Anders