1

This is a bit of a followup on https://emacs.stackexchange.com/a/27680/46612 and cycle through completions while showing completions buffer

I have set the completions format to vertical:

  • start emacs -Q
  • M-x set-variable completions-format vertical

Now when I use find-file:

  • C-x C-f
  • <TAB> <TAB>

I get a directory list sorted vertically.

Click on a completion to select it. In this buffer, type RET to select the completion near point. 6 possible completions: ../ AB ./ B A CC 

but when I use M-<down> to select one of them, the selection still moves horizontally. ie the order of suggestions is

  • ../
  • AB
  • ./
  • B
  • A
  • CC

This seems rather odd and counter-intuitive to me. (with the completions-format left at its default value, the selection still moves horizontally (kind of … the down key always goes right, regardless of setting), but that means suggestions get selected ../, ./, A, AB, B, CC, which I prefer.)

Is there a way to make minibuffer-next-completion (my understanding of what M-<down> calls) respect the original sorting of selections and move vertically with the vertical format?

4
  • I can't reproduce this: I get the completions in a single column and M-<down> starts from the top and goes down (and at the end of the list, cycles back to the beginning). I do not get the two-column layout that you seem to be getting. Commented Jan 24 at 3:52
  • 1
    I see that that contradicts the doc string of completions-format which says: If the value is ‘vertical’, display completions sorted vertically in columns in the *Completions* buffer. so I should be getting what you are getting; but the rest of the doc string also suggests a workaround for you: try setting it to one-column. I have to investigate further why for me vertical gives what one-column should be giving me. Commented Jan 24 at 3:56
  • 1
    I'm on emacs 29.4 (ppa.launchpadcontent.net/ubuntuhandbook1/emacs/ubuntu) if that makes a difference. the behaviour with one-column indeed fixes the ordering for M-<down> but i think the vertical (and horizontal) are still better in terms of screen space usage :/ Commented Jan 24 at 13:46
  • I can't reproduce it with Emacs 29.4 and starting with emacs -Q either: that's very strange. Commented Jan 24 at 13:53

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.