GNU bug report logs -
#78959
31.0.50; *Completions* buffer navigation with 'n' and 'p'
Previous Next
To reply to this bug, email your comments to 78959 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#78959
; Package
emacs
.
(Sat, 05 Jul 2025 08:22:04 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Dani Moncayo <dmoncayo <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sat, 05 Jul 2025 08:22:04 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Starting from ‘emacs -Q’, type this: M-x a u t o - <TAB>
That should create a *Completions* buffer with some completion
alternatives sorted alphabetically and arranged in several columns.
OK, now type 'M-v' to select that buffer and try to move around
completion alternatives with ‘n’ and ‘p’. Note that these keys move
among the completion alternatives in alphabetical order, as expected.
Now, repeat the experiment after setting ‘completions-format’ to 'vertical:
(setq completions-format 'vertical)
This time, ‘n’ and ‘p’ do _not_ move in alphabetical order, as (I think)
they should.
--
Dani Moncayo
In GNU Emacs 31.0.50 (build 46, x86_64-pc-linux-gnu, GTK+ Version
3.24.41, cairo version 1.18.0) of 2025-07-04 built on C11-Q8YAKWONJX0
Repository revision: 763c3cd081a833940961373a73705640b1808636
Repository branch: master
Windowing system distributor 'Microsoft Corporation', version 11.0.12010000
System Description: Ubuntu 24.04.2 LTS
Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG
LIBSELINUX LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG SECCOMP SOUND
THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINERAMA
XINPUT2 XPM XRANDR GTK3 ZLIB
Important settings:
value of $LANG: C.UTF-8
locale-coding-system: utf-8-unix
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#78959
; Package
emacs
.
(Sat, 05 Jul 2025 09:40:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 78959 <at> debbugs.gnu.org (full text, mbox):
A couple of further remarks.
In general, the navigation among candidates should be consistent with
the 'completions-sort' setting, I think.
The same issue reported in this ticket applies to the keys M-<down>
and M-<up>, when typed from the minibuffer to navigate among
completion candidates.
Thanks.
--
Dani Moncayo
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#78959
; Package
emacs
.
(Sat, 05 Jul 2025 19:07:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 78959 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Sat, 5 Jul 2025 10:21:34 +0200 Dani Moncayo <dmoncayo <at> gmail.com> wrote:
> Starting from ‘emacs -Q’, type this: M-x a u t o - <TAB>
>
> That should create a *Completions* buffer with some completion
> alternatives sorted alphabetically and arranged in several columns.
>
> OK, now type 'M-v' to select that buffer and try to move around
> completion alternatives with ‘n’ and ‘p’. Note that these keys move
> among the completion alternatives in alphabetical order, as expected.
>
> Now, repeat the experiment after setting ‘completions-format’ to 'vertical:
> (setq completions-format 'vertical)
>
> This time, ‘n’ and ‘p’ do _not_ move in alphabetical order, as (I think)
> they should.
On Sat, 5 Jul 2025 11:39:07 +0200 Dani Moncayo <dmoncayo <at> gmail.com> wrote:
> A couple of further remarks.
>
> In general, the navigation among candidates should be consistent with
> the 'completions-sort' setting, I think.
>
> The same issue reported in this ticket applies to the keys M-<down>
> and M-<up>, when typed from the minibuffer to navigate among
> completion candidates.
I tried to give it a shot with the attached patch, which seems to DTRT
for your test case with `n', `p', `M-<down>' and `M-<up>'. You might
give it a try and see if you find any problems with it. (But maybe
don't look at the code too closely, it's ugly as hell....)
Steve Berman
[Message part 2 (text/x-patch, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#78959
; Package
emacs
.
(Sun, 06 Jul 2025 07:15:03 GMT)
Full text and
rfc822 format available.
Message #14 received at 78959 <at> debbugs.gnu.org (full text, mbox):
On Sat, Jul 5, 2025 at 9:06 PM Stephen Berman <stephen.berman <at> gmx.net> wrote:
>
> [...]
>
> I tried to give it a shot with the attached patch, which seems to DTRT
> for your test case with `n', `p', `M-<down>' and `M-<up>'. You might
> give it a try and see if you find any problems with it. (But maybe
> don't look at the code too closely, it's ugly as hell....)
I've just re-tested the recipe of the OP with your patch applied, and
it seems to fix the problem.
(I can't say almost anything about the code, cause I lack the needed
knowledge to assess it).
Thanks!
--
Dani Moncayo
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#78959
; Package
emacs
.
(Sun, 06 Jul 2025 07:23:03 GMT)
Full text and
rfc822 format available.
Message #17 received at 78959 <at> debbugs.gnu.org (full text, mbox):
On Sun, Jul 6, 2025 at 9:13 AM Dani Moncayo <dmoncayo <at> gmail.com> wrote:
>
> [...]
>
> I've just re-tested the recipe of the OP with your patch applied, and
> it seems to fix the problem.
I just found a minor issue: with completions-format set to 'vertical, if I type:
M-x a u t o - <TAB> M-<down>
I get an error in the echo area ([No completion here]), and the cursor
in the *Completions* buffer is not placed in the first candidate (as
it should). I have to type a second M-<down> to go to the first
candidate.
--
Dani Moncayo
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#78959
; Package
emacs
.
(Sun, 06 Jul 2025 09:39:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 78959 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Sun, 6 Jul 2025 09:22:37 +0200 Dani Moncayo <dmoncayo <at> gmail.com> wrote:
> On Sun, Jul 6, 2025 at 9:13 AM Dani Moncayo <dmoncayo <at> gmail.com> wrote:
>>
>> [...]
>>
>> I've just re-tested the recipe of the OP with your patch applied, and
>> it seems to fix the problem.
>
> I just found a minor issue: with completions-format set to 'vertical, if I type:
>
> M-x a u t o - <TAB> M-<down>
>
> I get an error in the echo area ([No completion here]), and the cursor
> in the *Completions* buffer is not placed in the first candidate (as
> it should). I have to type a second M-<down> to go to the first
> candidate.
Thanks for testing and finding this problem! The attached patch
(replacing, not modifying, my previous patch) should fix it.
Steve Berman
[Message part 2 (text/x-patch, attachment)]
This bug report was last modified today.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.