Subject: Re: bug#51650: Autocomplete: first Tab should show *Completions* buffer

From: Eli Zaretskii <[email-masked]>
Date: Sun, 07 Nov 2021 10:24:33 +0200

> From: Carlos Pita <[email-masked]>
> Date: Sun, 7 Nov 2021 05:16:50 -0300
> Cc: [email-masked]
> 
> I can understand why things work the way they do by looking at the
> implementation. But I can't put it into simple meaningful reasons. The
> manual says that when Tab is unable to complete it displays a list of
> possible completions, yet in step 2 this is not true.

That's because TAB _is_ able to complete, but only partially.  And
with file names, it can well be that the partial match is what you
want.

> The implementation checks that the last command and the current
> command are the same before showing that list of completions, so it
> surely won't happen in step 2 since it's the first and only Tab in
> the sequence. In order to explain this, one seems forced to say that
> _at least_ two Tabs in a row have to be pressed to show the
> *Completions* buffer: one won't do it, exactly two won't always do
> it (both of them may complete something), so there must be a
> sequence of at least two Tabs and the last one must be unable to
> complete.

The 2 TABs are necessary if the partial completion is not what you
want.  Emacs cannot know that, only you, the user, can.