bug#81631: 32.0.50; setting completion-auto-select t when completions-format is 'vertical doesn't returns to the minibuffer when cycling

Stephen Berman via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <[email protected]>
Newsgroups gmane.emacs.bugs
Message-ID <[email protected]>
On Mon, 17 Aug 2026 08:10:04 -0400 Lucas Jimenez <[email protected]> wrote:

> I didn’t know you were describing your issue (1) with the applied
> patched.  Now I do.  After your patch is applied I see the same
> behavior with ‘vertical and ‘horizontal.

Thanks for confirming that.  Eli and Sean, can the patch be installed in
emacs-31?  As I mentioned upthread, I overlooked the behavior of TAB to
cycle through the minibuffer when I made the changes in 77ca60b48d01, so
the patch simply extends the existing behavior in the horizontal format
to the vertical format.  (I would install it after Spencer Baugh's fix
for bug#81635, which I think should also go into the release branch, is
installed and after adjusting it to Spencer's changes).

>> I don't quite understand what you're describing.  Can you give a step by
>> step reproducer with specific input starting emacs with -Q?
>
> What I mean, after applying your patch, is this:
>
> The step by step is this:
>
> 1) Start emacs with:
> emacs -Q --eval "(setq completions-format 'horizontal completion-auto-select t)”
>
> 2) The try complete in here and I notice it does the full cycle the same with
> ‘horizontal (Ending in slash):
> C-x C-f ~/.emacs.d/
>
> 3) BUT if I try to complete like this it gets stuck like you mentioned in
> issue (1) (notice the ‘e’ in the completion for a file):
> C-x C-f ~/.emacs.d/e
>
> In conclusion: If I try completion in a directory (ending with /) it does the
> full cycle, and if I try to complete a file it gets stuck.  So I don’t know if
> the problem is the annotation, since when trying to complete a file there is
> no annotation and it gets stuck.  Hope this is more clear

Yes, thanks, now it's clear.  The reason completing with TAB on `C-x C-f
~/.emacs.d/e' "gets stuck" has nothing to do with whether the completion
candidates have annotations; rather, the "e" determines an offset from
the prefix "~/.emacs.d/" and code at the end of
`minibuffer-completion-help' uses this offset when TAB returns from the
minibuffer to the *Completions* buffer to go to back the last candidate
instead of cycling to the first one as it used to do (this is
bug#81635).  In contrast, when completing with TAB on `C-x C-f
~/.emacs.d/' there is no offset and all completion candidates are still
available, so cycling works as expected.

Steve Berman
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.