Subject: bug#52389: 29.0.50; Imenu does not pop up the Completions eagerly

From: Protesilaos Stavrou <[email-masked]>
Date: Sun, 12 Dec 2021 08:09:07 +0200

On 2021-12-11, 22:16 +0200, Juri Linkov <[email-masked]> wrote:

>>> I think the safest way to solve this long-standing problem without
>>> surprising users is to introduce a new variable whose logic is handled
>>> correctly, and mark imenu-eager-completion-buffer as deprecated.
>>
>> Sounds good to me.  (The new variable could be an alias of the old name,
>> but have a name with the opposite meaning, and then things would
>> continue to work for everybody.)
>
> This is a good opportunity for generalization.
> Like there is icomplete-show-matches-on-no-input,
> would it be possible to create a new user option
> e.g. minibuffer-auto-show-completions, and allow
> to customize what commands should use it.
> Then it could be like completion-auto-select
> recently proposed by Philip.

That is possible with my mct package on GNU ELPA.  It has the option of
a passlist for commands that should eagerly pop up the Completions'
buffer.

[ Philip mentioned mct in those patches. ]

Note, however, that the case here with Imenu is different because even
if you pop the completions eagerly upon M-x imenu, you still need to
handle the case of nested Imenu entries.  That is what the user option
imenu-eager-completion-buffer helps deal with.  Actually, what prompted
me to report this bug was due to an issue in the mct repo, where I
discovered the confusing doc string of that Imenu user option:
<https://gitlab.com/protesilaos/mct/-/issues/12>.

-- 
Protesilaos Stavrou
https://protesilaos.com