Juri Linkov <juri@HIDDEN>
to control <at> debbugs.gnu.org.
Full text available.Received: (at 80024) by debbugs.gnu.org; 14 Jan 2026 18:48:45 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 14 13:48:45 2026 Received: from localhost ([127.0.0.1]:47612 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1vg5vA-0006cr-Sm for submit <at> debbugs.gnu.org; Wed, 14 Jan 2026 13:48:45 -0500 Received: from mout-p-202.mailbox.org ([2001:67c:2050:0:465::202]:57480) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1vg5v8-0006c0-0w; Wed, 14 Jan 2026 13:48:42 -0500 Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4drw9r3Skkz9tdV; Wed, 14 Jan 2026 19:48:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; t=1768416512; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=UagplqgJdDBMhbDUnrx3y96BcduZQ3+5p5WagytwomI=; b=b9Yj+l61AjU01GeWk3i3YPk3Np7DFWs4KHFdWhXwDCs79dUcb9W8jELFFqmlXekg0BopKb tCpehBG/uKkcR0whRjNTFWyFTR1V9BWhxDYIkgLp9HALrZyQ+BrThIJIyjv2vwPDE0zKiz T/XpfRMk0vvzAfcVrNhHFDhqTMjMNHbwWy2KsxVN0NFoHP09quVZu5EaLx8PRRB4H0d00T j9T5UHgg45FCiWemLEbE7BHDvYv9TO6UZlstirQ6O+OZS0nx6b7TaUtFvqiKrSbygC5ryr VHxnKjkCnBIfmWjcvUxgois7pISlFw0NOUoV5JmiLFHpJStugP8XMrEkklKYFg== Authentication-Results: outgoing_mbo_mout; dkim=none; spf=pass (outgoing_mbo_mout: domain of juri@HIDDEN designates 2001:67c:2050:b231:465::2 as permitted sender) smtp.mailfrom=juri@HIDDEN From: Juri Linkov <juri@HIDDEN> To: Spencer Baugh <sbaugh@HIDDEN> Subject: Re: bug#80024: 30.1.90; minibuffer-visible-completions always rebinds left/right In-Reply-To: <ier8qe1pb0f.fsf@HIDDEN> Organization: LINKOV.NET References: <iersed9xbhg.fsf@HIDDEN> <87v7i34ujm.fsf@HIDDEN> <ierzf7ayyyu.fsf@HIDDEN> <87ikdxu2bk.fsf@HIDDEN> <ierldityxqt.fsf@HIDDEN> <ierpl7l8oq6.fsf@HIDDEN> <87wm1tmh7i.fsf@HIDDEN> <ier8qe1pb0f.fsf@HIDDEN> Date: Wed, 14 Jan 2026 20:48:14 +0200 Message-ID: <87ldi0c9ox.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain X-Rspamd-Queue-Id: 4drw9r3Skkz9tdV X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 80024 Cc: 80024 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) close 80024 31.0.50 thanks > Fixed. Also with a proper commit message now. Thanks, now pushed and closed.
bug-gnu-emacs@HIDDEN:bug#80024; Package emacs.
Full text available.
Received: (at 80024) by debbugs.gnu.org; 13 Jan 2026 19:29:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jan 13 14:29:14 2026
Received: from localhost ([127.0.0.1]:44019 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1vfk4n-0005Gk-DD
for submit <at> debbugs.gnu.org; Tue, 13 Jan 2026 14:29:13 -0500
Received: from mxout5.mail.janestreet.com ([64.215.233.18]:36183)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from <sbaugh@HIDDEN>)
id 1vfk4k-0005GL-Py
for 80024 <at> debbugs.gnu.org; Tue, 13 Jan 2026 14:29:11 -0500
From: Spencer Baugh <sbaugh@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#80024: 30.1.90; minibuffer-visible-completions always
rebinds left/right
In-Reply-To: <87wm1tmh7i.fsf@HIDDEN> (Juri Linkov's message of "Wed,
07 Jan 2026 20:15:21 +0200")
References: <iersed9xbhg.fsf@HIDDEN> <87v7i34ujm.fsf@HIDDEN>
<ierzf7ayyyu.fsf@HIDDEN> <87ikdxu2bk.fsf@HIDDEN>
<ierldityxqt.fsf@HIDDEN> <ierpl7l8oq6.fsf@HIDDEN>
<87wm1tmh7i.fsf@HIDDEN>
Date: Tue, 13 Jan 2026 14:29:04 -0500
Message-ID: <ier8qe1pb0f.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com;
s=waixah; t=1768332544;
bh=FDkDqPlR9zzPd7XTbNLtNL64s4reXFB+GhSl00sCaXY=;
h=From:To:Cc:Subject:In-Reply-To:References:Date;
b=LPQEDF2WQhcnCvWkdkF3PyqNlNjvKu4ORO4L25/Wx8XBmF4OKD2J/mC6eMT8u3ZM6
RljvvSwuhcaihi8Bvk3QGfFmijYYNzpyR0O5Hu4ETA3TRGgTwVZr6rcAvTehbealBj
kAMi+hUcteiJq+yPAcnWkcMHvx0dLT+owxrT9cny/nTEExY1Sw0pvnE4RimuYVMgYW
SOOl3K0mwSqFF0TOm1EgiEG7pm6yvhu7vsJ0vCKFy50VNPkURsKBoPE+vPbOWflggj
NIGUMVm+lT6o5S7v1xiY4xjH3n5fRvv6lgPVx3s0DfSUXVR3+bSxadxzwA4mTEuBrZ
gLaIQhuDtYHog==
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 80024
Cc: 80024 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)
--=-=-=
Content-Type: text/plain
Juri Linkov <juri@HIDDEN> writes:
>> Well, I was a bit too hasty in thinking this. I did:
>>
>> (keymap-set minibuffer-local-completion-map "<up>" #'minibuffer-previous-completion)
>> (keymap-set minibuffer-local-completion-map "<down>" #'minibuffer-next-completion)
>>
>> But this is annoying to users that don't have
>> completion-eager-display=t. They, of course, were using <up> and <down>
>> for history navigation and don't want to have to learn to use M-p and
>> M-n instead.
>>
>> So I guess I still want conditional bindings which depend on whether the
>> *Completions* buffer is displayed.
>>
>> How about this?
>
> It's nice that this option will match the default keys
> 'M-<up>' and 'M-<down>' in 'minibuffer-local-completion-map'.
>
> BTW, there is one compilation warning:
>
> minibuffer.el:3505:16: Warning: defvar
> `minibuffer-visible-completions-up-down-map'
> docstring wider than 80 characters
Fixed. Also with a proper commit message now.
--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline;
filename=0001-Add-new-up-down-option-for-minibuffe-visible-complet.patch
From 40ba0c50305ff542f893fe4ec2dde9a9aea8693a Mon Sep 17 00:00:00 2001
From: Spencer Baugh <sbaugh@HIDDEN>
Date: Tue, 13 Jan 2026 14:28:05 -0500
Subject: [PATCH] Add new up-down option for minibuffe-visible-completions
* lisp/emacs-lisp/crm.el (completing-read-multiple): Call
minibuffer-visible-completions--maybe-compose-map.
* lisp/minibuffer.el (completion-in-region-mode): Call
minibuffer-visible-completions--maybe-compose-map.
(minibuffer-visible-completions): Add new value 'up-down. (bug#80024)
(minibuffer-visible-completions-up-down-map): Add.
(minibuffer-visible-completions--maybe-compose-map): Add helper
function.
(completing-read-default): Call
minibuffer-visible-completions--maybe-compose-map.
* lisp/simple.el (completion-setup-function): Check
minibuffer-visible-completions is t, not just non-nil.
---
lisp/emacs-lisp/crm.el | 6 +-----
lisp/minibuffer.el | 30 +++++++++++++++++++-----------
lisp/simple.el | 2 +-
3 files changed, 21 insertions(+), 17 deletions(-)
diff --git a/lisp/emacs-lisp/crm.el b/lisp/emacs-lisp/crm.el
index b91fa165986..6bd763d2ea2 100644
--- a/lisp/emacs-lisp/crm.el
+++ b/lisp/emacs-lisp/crm.el
@@ -254,11 +254,7 @@ completing-read-multiple
(let* ((map (if require-match
crm-local-must-match-map
crm-local-completion-map))
- (map (if minibuffer-visible-completions
- (make-composed-keymap
- (list minibuffer-visible-completions-map
- map))
- map))
+ (map (minibuffer-visible-completions--maybe-compose-map map))
(buffer (current-buffer))
input)
(minibuffer-with-setup-hook
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index 89e6f1430b5..89b4f04f2c5 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -3195,11 +3195,7 @@ completion-in-region-mode
(setq-local minibuffer-completion-auto-choose nil)
(add-hook 'post-command-hook #'completion-in-region--postch)
(let* ((keymap completion-in-region-mode-map)
- (keymap (if minibuffer-visible-completions
- (make-composed-keymap
- (list minibuffer-visible-completions-map
- keymap))
- keymap)))
+ (keymap (minibuffer-visible-completions--maybe-compose-map keymap)))
(push `(completion-in-region-mode . ,keymap)
minor-mode-overriding-map-alist))))
@@ -3472,7 +3468,9 @@ minibuffer-visible-completions
If the *Completions* buffer is not displayed on the screen, or this
variable is nil, the arrow keys move point in the minibuffer as usual,
and `RET' accepts the input typed into the minibuffer."
- :type 'boolean
+ :type '(choice (const :tag "Disable completions navigation" nil)
+ (const :tag "Enable up/down/left/right" t)
+ (const :tag "Enable only up/down" up-down))
:version "30.1")
(defvar minibuffer-visible-completions--always-bind nil
@@ -3517,6 +3515,20 @@ minibuffer-visible-completions-map
"<up>" (minibuffer-visible-completions--bind #'minibuffer-previous-line-completion)
"<down>" (minibuffer-visible-completions--bind #'minibuffer-next-line-completion)
"C-g" (minibuffer-visible-completions--bind #'minibuffer-hide-completions))
+
+(defvar-keymap minibuffer-visible-completions-up-down-map
+ :doc "Local keymap for minibuffer input with visible completions, only for up/down."
+ "<up>" (minibuffer-visible-completions--bind #'minibuffer-previous-completion)
+ "<down>" (minibuffer-visible-completions--bind #'minibuffer-next-completion))
+
+(defun minibuffer-visible-completions--maybe-compose-map (map)
+ (cond
+ ((eq minibuffer-visible-completions 'up-down)
+ (make-composed-keymap (list minibuffer-visible-completions-up-down-map map)))
+ ((eq minibuffer-visible-completions t)
+ (make-composed-keymap (list minibuffer-visible-completions-map map)))
+ (t map)))
+
;;; Completion tables.
@@ -5172,11 +5184,7 @@ completing-read-default
;; in minibuffer-local-filename-completion-map can
;; override bindings in base-keymap.
base-keymap)))
- (keymap (if minibuffer-visible-completions
- (make-composed-keymap
- (list minibuffer-visible-completions-map
- keymap))
- keymap))
+ (keymap (minibuffer-visible-completions--maybe-compose-map keymap))
(buffer (current-buffer))
(c-i-c completion-ignore-case)
(result
diff --git a/lisp/simple.el b/lisp/simple.el
index d79aa2d3046..f06e473d383 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -10730,7 +10730,7 @@ completion-setup-function
(if (display-mouse-p)
"Click or type \\[minibuffer-choose-completion] on a completion to select it.\n"
"Type \\[minibuffer-choose-completion] on a completion to select it.\n"))
- (if minibuffer-visible-completions
+ (if (eq minibuffer-visible-completions t)
(substitute-command-keys
"Type \\[minibuffer-next-completion], \\[minibuffer-previous-completion], \
\\[minibuffer-next-line-completion], \\[minibuffer-previous-line-completion] \
--
2.43.7
--=-=-=--
bug-gnu-emacs@HIDDEN:bug#80024; Package emacs.
Full text available.Received: (at 80024) by debbugs.gnu.org; 7 Jan 2026 18:17:25 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 07 13:17:24 2026 Received: from localhost ([127.0.0.1]:37741 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1vdY5z-0007Si-Eh for submit <at> debbugs.gnu.org; Wed, 07 Jan 2026 13:17:24 -0500 Received: from mout-p-202.mailbox.org ([2001:67c:2050:0:465::202]:39300) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1vdY5v-0007R7-QP for 80024 <at> debbugs.gnu.org; Wed, 07 Jan 2026 13:17:21 -0500 Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4dmbps2KK2z9tXR; Wed, 7 Jan 2026 19:17:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; t=1767809829; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=33cnZpO4VWTd2CmyxZK+W/nIpnajOBrYdtnjL2gRY1A=; b=cHiHg8eGsLPexAltDgKmHn+ieMGiB5r0SRRThSxNcTgqPsfkHrlMNPVVZVadY0X8h5fqyJ zei6qY3Ivs8nifaqtURVFJqh/IlzY6Aa0bwKGCnQ/C/k7ZrXuJi6clFaiN7FYgaPUfYk/A 66f913MKyM1hs8cvH0gawT3VWspnqPt9+13jd29at+XCRH8vjDtEBqTBC+qi7vpeAboJWb cTyROTSMNHF/JhBFq4eUHO2IOY+d/eLOJup8WEhBoUWPMM0aE+FUkAMJFdlbYzChxredDi x8QQ23N5CVLqjgNiZuHvazFBNEzBYeJn6a/g+lIcng9m2iVsgwFI95dsh+jhtQ== From: Juri Linkov <juri@HIDDEN> To: Spencer Baugh <sbaugh@HIDDEN> Subject: Re: bug#80024: 30.1.90; minibuffer-visible-completions always rebinds left/right In-Reply-To: <ierpl7l8oq6.fsf@HIDDEN> Organization: LINKOV.NET References: <iersed9xbhg.fsf@HIDDEN> <87v7i34ujm.fsf@HIDDEN> <ierzf7ayyyu.fsf@HIDDEN> <87ikdxu2bk.fsf@HIDDEN> <ierldityxqt.fsf@HIDDEN> <ierpl7l8oq6.fsf@HIDDEN> Date: Wed, 07 Jan 2026 20:15:21 +0200 Message-ID: <87wm1tmh7i.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 80024 Cc: 80024 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) > Well, I was a bit too hasty in thinking this. I did: > > (keymap-set minibuffer-local-completion-map "<up>" #'minibuffer-previous-completion) > (keymap-set minibuffer-local-completion-map "<down>" #'minibuffer-next-completion) > > But this is annoying to users that don't have > completion-eager-display=t. They, of course, were using <up> and <down> > for history navigation and don't want to have to learn to use M-p and > M-n instead. > > So I guess I still want conditional bindings which depend on whether the > *Completions* buffer is displayed. > > How about this? It's nice that this option will match the default keys 'M-<up>' and 'M-<down>' in 'minibuffer-local-completion-map'. BTW, there is one compilation warning: minibuffer.el:3505:16: Warning: defvar `minibuffer-visible-completions-up-down-map' docstring wider than 80 characters
bug-gnu-emacs@HIDDEN:bug#80024; Package emacs.
Full text available.
Received: (at 80024) by debbugs.gnu.org; 7 Jan 2026 14:46:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 07 09:46:50 2026
Received: from localhost ([127.0.0.1]:35424 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1vdUoD-00052P-7I
for submit <at> debbugs.gnu.org; Wed, 07 Jan 2026 09:46:49 -0500
Received: from mxout5.mail.janestreet.com ([64.215.233.18]:57095)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from <sbaugh@HIDDEN>)
id 1vdUoA-000523-UZ
for 80024 <at> debbugs.gnu.org; Wed, 07 Jan 2026 09:46:47 -0500
From: Spencer Baugh <sbaugh@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#80024: 30.1.90; minibuffer-visible-completions always
rebinds left/right
In-Reply-To: <ierldityxqt.fsf@HIDDEN> (Spencer Baugh's message of
"Tue, 23 Dec 2025 11:22:02 -0500")
References: <iersed9xbhg.fsf@HIDDEN> <87v7i34ujm.fsf@HIDDEN>
<ierzf7ayyyu.fsf@HIDDEN> <87ikdxu2bk.fsf@HIDDEN>
<ierldityxqt.fsf@HIDDEN>
Date: Wed, 07 Jan 2026 09:46:41 -0500
Message-ID: <ierpl7l8oq6.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com;
s=waixah; t=1767797201;
bh=nWGrYsFRGhjxvz30zn1fFl14jAnPfAntYXLKus4Jm5c=;
h=From:To:Cc:Subject:In-Reply-To:References:Date;
b=176+mvpuqjlBoE13ppQxCHR8nOWnTORH4vFq6MiheOiML8BKrdEP9OM7nZewsVUv5
XFR0VpY0xipePS3UJqdqNzzehJNiWtGewOLDbeiZH0U7+MyscaQ7VGy2yee9hw5uZn
W1tvAAoyk30weZWBtYehnJJrXDpI+JgQMhDVyoGf+E95hbG59jmNz/RTcoSzeuEbwX
1lq0T1OnmklBxZJGPAFDTQc3Ay5HJiw6hYbrHRu9jNfCZKT1mPmMtYC3+pfRV1IHML
Kvucsh6i4PVSDLv7liUJpxJCu7njaF8ACNE0rJkG7XmUZisz9kXPnhb9lDygHK8oL9
eyu7wi0PMHl0Q==
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 80024
Cc: 80024 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)
--=-=-=
Content-Type: text/plain
Spencer Baugh <sbaugh@HIDDEN> writes:
> With completion-eager-display, I find that the completions are basically
> always displayed. So the minibuffer-visible-completions bindings are
> always in effect, even though they're bound conditionally on
> *Completions* being displayed. So the conditinal binding doesn't end up
> being useful, it's just occasionally confusing.
Well, I was a bit too hasty in thinking this. I did:
(keymap-set minibuffer-local-completion-map "<up>" #'minibuffer-previous-completion)
(keymap-set minibuffer-local-completion-map "<down>" #'minibuffer-next-completion)
But this is annoying to users that don't have
completion-eager-display=t. They, of course, were using <up> and <down>
for history navigation and don't want to have to learn to use M-p and
M-n instead.
So I guess I still want conditional bindings which depend on whether the
*Completions* buffer is displayed.
How about this?
--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline;
filename=0001-minibuffer-visible-completions-up-down.patch
From e641b80f89c8f45c6b0c3589dc57a42a08aa3979 Mon Sep 17 00:00:00 2001
From: Spencer Baugh <sbaugh@HIDDEN>
Date: Wed, 7 Jan 2026 09:45:37 -0500
Subject: [PATCH] minibuffer-visible-completions up-down
---
lisp/emacs-lisp/crm.el | 6 +-----
lisp/minibuffer.el | 30 +++++++++++++++++++-----------
lisp/simple.el | 2 +-
3 files changed, 21 insertions(+), 17 deletions(-)
diff --git a/lisp/emacs-lisp/crm.el b/lisp/emacs-lisp/crm.el
index b91fa165986..6bd763d2ea2 100644
--- a/lisp/emacs-lisp/crm.el
+++ b/lisp/emacs-lisp/crm.el
@@ -254,11 +254,7 @@ completing-read-multiple
(let* ((map (if require-match
crm-local-must-match-map
crm-local-completion-map))
- (map (if minibuffer-visible-completions
- (make-composed-keymap
- (list minibuffer-visible-completions-map
- map))
- map))
+ (map (minibuffer-visible-completions--maybe-compose-map map))
(buffer (current-buffer))
input)
(minibuffer-with-setup-hook
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index 89e6f1430b5..418e58bd5c4 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -3195,11 +3195,7 @@ completion-in-region-mode
(setq-local minibuffer-completion-auto-choose nil)
(add-hook 'post-command-hook #'completion-in-region--postch)
(let* ((keymap completion-in-region-mode-map)
- (keymap (if minibuffer-visible-completions
- (make-composed-keymap
- (list minibuffer-visible-completions-map
- keymap))
- keymap)))
+ (keymap (minibuffer-visible-completions--maybe-compose-map keymap)))
(push `(completion-in-region-mode . ,keymap)
minor-mode-overriding-map-alist))))
@@ -3472,7 +3468,9 @@ minibuffer-visible-completions
If the *Completions* buffer is not displayed on the screen, or this
variable is nil, the arrow keys move point in the minibuffer as usual,
and `RET' accepts the input typed into the minibuffer."
- :type 'boolean
+ :type '(choice (const :tag "Disable completions navigation" nil)
+ (const :tag "Enable up/down/left/right" t)
+ (const :tag "Enable only up/down" up-down))
:version "30.1")
(defvar minibuffer-visible-completions--always-bind nil
@@ -3517,6 +3515,20 @@ minibuffer-visible-completions-map
"<up>" (minibuffer-visible-completions--bind #'minibuffer-previous-line-completion)
"<down>" (minibuffer-visible-completions--bind #'minibuffer-next-line-completion)
"C-g" (minibuffer-visible-completions--bind #'minibuffer-hide-completions))
+
+(defvar-keymap minibuffer-visible-completions-up-down-map
+ :doc "Local keymap for minibuffer input with visible completions, just binding up/down."
+ "<up>" (minibuffer-visible-completions--bind #'minibuffer-previous-completion)
+ "<down>" (minibuffer-visible-completions--bind #'minibuffer-next-completion))
+
+(defun minibuffer-visible-completions--maybe-compose-map (map)
+ (cond
+ ((eq minibuffer-visible-completions 'up-down)
+ (make-composed-keymap (list minibuffer-visible-completions-up-down-map map)))
+ ((eq minibuffer-visible-completions t)
+ (make-composed-keymap (list minibuffer-visible-completions-map map)))
+ (t map)))
+
;;; Completion tables.
@@ -5172,11 +5184,7 @@ completing-read-default
;; in minibuffer-local-filename-completion-map can
;; override bindings in base-keymap.
base-keymap)))
- (keymap (if minibuffer-visible-completions
- (make-composed-keymap
- (list minibuffer-visible-completions-map
- keymap))
- keymap))
+ (keymap (minibuffer-visible-completions--maybe-compose-map keymap))
(buffer (current-buffer))
(c-i-c completion-ignore-case)
(result
diff --git a/lisp/simple.el b/lisp/simple.el
index d79aa2d3046..f06e473d383 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -10730,7 +10730,7 @@ completion-setup-function
(if (display-mouse-p)
"Click or type \\[minibuffer-choose-completion] on a completion to select it.\n"
"Type \\[minibuffer-choose-completion] on a completion to select it.\n"))
- (if minibuffer-visible-completions
+ (if (eq minibuffer-visible-completions t)
(substitute-command-keys
"Type \\[minibuffer-next-completion], \\[minibuffer-previous-completion], \
\\[minibuffer-next-line-completion], \\[minibuffer-previous-line-completion] \
--
2.43.7
--=-=-=--
bug-gnu-emacs@HIDDEN:bug#80024; Package emacs.
Full text available.Received: (at 80024) by debbugs.gnu.org; 23 Dec 2025 17:17:34 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 23 12:17:34 2025 Received: from localhost ([127.0.0.1]:57916 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1vY60s-0003SB-8X for submit <at> debbugs.gnu.org; Tue, 23 Dec 2025 12:17:34 -0500 Received: from mout-p-101.mailbox.org ([80.241.56.151]:38120) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1vY60p-0003RT-6A for 80024 <at> debbugs.gnu.org; Tue, 23 Dec 2025 12:17:32 -0500 Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4dbMBq0vxgz9syH; Tue, 23 Dec 2025 18:17:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; t=1766510243; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Xdbutmq99UFyE8JK43hc042udJ/Su0aDonT4PzJaE6w=; b=fBYOPXV+5iIODo/yf8QHbToRr8CY7TdV58k/V9B2eAdXT3fXuK3blSE4acVvEuKIYJnI1U Qp+oO5VHpFMixj9m7ZH2cvCWwfRq83V6/PhOIefOuDrgtOkzkdYtthW27yXiIvflBtr388 PX1V/NTbhjBPCUQ69IWRswk7iF0Nqf+yXRmLzKCfv90zW7j0udX1Zp/Ne+1cIFZe+f+XIM UX+V/CM7RI/M5FkTFBt2MDPPet9wYznXsURrSO+rZOOIK11P5HzaGx2J4XqTyI3x/Et5eT 5nP3W9b2IKjHPXw6Vi0Rbpsbx1O27gRxLp2WT3dmWs/IOKAz44m/agIsV0wd7w== Authentication-Results: outgoing_mbo_mout; dkim=none; spf=pass (outgoing_mbo_mout: domain of juri@HIDDEN designates 2001:67c:2050:b231:465::2 as permitted sender) smtp.mailfrom=juri@HIDDEN From: Juri Linkov <juri@HIDDEN> To: Spencer Baugh <sbaugh@HIDDEN> Subject: Re: bug#80024: 30.1.90; minibuffer-visible-completions always rebinds left/right In-Reply-To: <ierldityxqt.fsf@HIDDEN> Organization: LINKOV.NET References: <iersed9xbhg.fsf@HIDDEN> <87v7i34ujm.fsf@HIDDEN> <ierzf7ayyyu.fsf@HIDDEN> <87ikdxu2bk.fsf@HIDDEN> <ierldityxqt.fsf@HIDDEN> Date: Tue, 23 Dec 2025 19:05:51 +0200 Message-ID: <87o6npuo8s.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain X-Rspamd-Queue-Id: 4dbMBq0vxgz9syH X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 80024 Cc: 80024 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) >> Mnemonically <up> looks like the right key to pop up the completions buffer, >> but after displaying the buffer <up> moves to the last completion >> at the end of the buffer that would be confusing to users. > > I'm mostly inspired by the completions available in other software like > the Firefox address bar, which I also think is the inspiration for most > other Emacs completion frontends. In such UIs: > > - the completions are automatically shown, they don't need to be requested > - up/down navigates between the completions > > For Emacs completions, the first part is done by > completion-eager-display. The second part is done by this change to the > <up>/<down> bindings. Indeed. Although there is still one difference with Firefox where the list of completions mixes various types of suggestions: from history, from bookmarks, etc. However, in Emacs these lists are separate: 1. TAB - list of completions 2. C-x up - list of history items 3. C-x down - list of suggestions
bug-gnu-emacs@HIDDEN:bug#80024; Package emacs.
Full text available.Received: (at 80024) by debbugs.gnu.org; 23 Dec 2025 16:22:10 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 23 11:22:10 2025 Received: from localhost ([127.0.0.1]:57541 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1vY59G-0008W9-E2 for submit <at> debbugs.gnu.org; Tue, 23 Dec 2025 11:22:10 -0500 Received: from mxout5.mail.janestreet.com ([64.215.233.18]:39895) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <sbaugh@HIDDEN>) id 1vY59E-0008Vr-2j for 80024 <at> debbugs.gnu.org; Tue, 23 Dec 2025 11:22:08 -0500 From: Spencer Baugh <sbaugh@HIDDEN> To: Juri Linkov <juri@HIDDEN> Subject: Re: bug#80024: 30.1.90; minibuffer-visible-completions always rebinds left/right In-Reply-To: <87ikdxu2bk.fsf@HIDDEN> (Juri Linkov's message of "Tue, 23 Dec 2025 09:24:07 +0200") References: <iersed9xbhg.fsf@HIDDEN> <87v7i34ujm.fsf@HIDDEN> <ierzf7ayyyu.fsf@HIDDEN> <87ikdxu2bk.fsf@HIDDEN> Date: Tue, 23 Dec 2025 11:22:02 -0500 Message-ID: <ierldityxqt.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=waixah; t=1766506922; bh=KDPLdU6WYvAByGcxkehaQm17SiaDO6a5aE9NMMAPnH8=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=gW+D9c0IjId7d5VU8qkkV18+iPXGA2JrvhyP7Fy9RvmWiJdXv1UP9c7OJCCvPeKwL KM6lCOuhVepY+kZuDcNOYAxwh16yZh2wZwhjJwUz/n0r4rX8DghYlJcLYQg3S9RKeW vo/ZthOaWuHM42ttHfSsG0sKaHOcI2qhJvq/QAlvRFxIBbcjdEamGL00UBeor2Pc3Y E+XPKQGtEpUW6KT/3JNiMylzGp3NGbMzZnkreo5OMa9iUAuJLTqjNEhSPkDH+63p8k zRL4Pnvpj4ihtnbwVhgRwUu64WPACbaNbLbffx0quoAdmwe0nLndXcaKQ2IeHtEDST jf0nlY8y20P1g== X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 80024 Cc: 80024 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) Juri Linkov <juri@HIDDEN> writes: >>> Anyway here is the current implementation. It would be nice >>> if you try and possibly rearrange the conditions inside >>> 'minibuffer-visible-completions--filter' to find the most >>> intuitive behavior. >> >> Actually on reflection I feel like just >> >> (keymap-set minibuffer-local-completion-map "<up>" #'minibuffer-previous-completion) >> (keymap-set minibuffer-local-completion-map "<down>" #'minibuffer-next-completion) >> >> provides the best behavior. (with null minibuffer-visible-completions) >> >> It is unfortunate that this loses the ability to use up/down to navigate >> history. But I guess all the non-default completion frontends lose that >> ability too, so maybe it's fine. M-n and M-p are perfectly good ways to >> navigate history. Hmm. > > Mnemonically <up> looks like the right key to pop up the completions buffer, > but after displaying the buffer <up> moves to the last completion > at the end of the buffer that would be confusing to users. I'm mostly inspired by the completions available in other software like the Firefox address bar, which I also think is the inspiration for most other Emacs completion frontends. In such UIs: - the completions are automatically shown, they don't need to be requested - up/down navigates between the completions For Emacs completions, the first part is done by completion-eager-display. The second part is done by this change to the <up>/<down> bindings. > Requesting to display the buffer explicitly with e.g <TAB> before navigating it > would be more intuitive for users. And also up/down will retain > their ability to navigate history before the completions are displayed. > > So we could still add an option 'up-down' to 'minibuffer-visible-completions'. With completion-eager-display, I find that the completions are basically always displayed. So the minibuffer-visible-completions bindings are always in effect, even though they're bound conditionally on *Completions* being displayed. So the conditinal binding doesn't end up being useful, it's just occasionally confusing.
bug-gnu-emacs@HIDDEN:bug#80024; Package emacs.
Full text available.Received: (at 80024) by debbugs.gnu.org; 23 Dec 2025 07:36:38 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 23 02:36:38 2025 Received: from localhost ([127.0.0.1]:53370 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1vXwwf-0008W1-BL for submit <at> debbugs.gnu.org; Tue, 23 Dec 2025 02:36:37 -0500 Received: from mout-p-202.mailbox.org ([2001:67c:2050:0:465::202]:60946) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1vXwwb-0008VY-Qb for 80024 <at> debbugs.gnu.org; Tue, 23 Dec 2025 02:36:36 -0500 Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4db6JR6NF0z9t9Z; Tue, 23 Dec 2025 08:36:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; t=1766475383; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=GnRM35gs2HHsV6ZACApx+8PzmZ2H2G85T7RIn/KufqE=; b=2FOtV+ZpohnGdJ4eggbstBZUq21SAZbELei+QafqE6CikXfjux0SivbW6twzdlHSB5zVcC 9QeNBoi0vJvkAssppddnIFeN0fhNgd184t8ZqLGvAIEAEK3lsT97i6H15FCQvDcydFAimZ nlOERpfx6xR0TTHblT9m2VFVSwSaVfRd9j/rVm0WwhcxHTIz6vDS1F2CmtzzQ4/ge9YDRJ xlQ6rg5q2nVuWH1pP2GWytm9/eesu9LqHL67nbHZ/j1qfdrvGxclZXuchz2qfnCvL5hLyz W20GrliL2jSLA0VGARaC7bLSiYJJ8my9dY1q4A4QYPXeChh11vgXxxcnAJuY6g== From: Juri Linkov <juri@HIDDEN> To: Spencer Baugh <sbaugh@HIDDEN> Subject: Re: bug#80024: 30.1.90; minibuffer-visible-completions always rebinds left/right In-Reply-To: <ierzf7ayyyu.fsf@HIDDEN> Organization: LINKOV.NET References: <iersed9xbhg.fsf@HIDDEN> <87v7i34ujm.fsf@HIDDEN> <ierzf7ayyyu.fsf@HIDDEN> Date: Tue, 23 Dec 2025 09:24:07 +0200 Message-ID: <87ikdxu2bk.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 80024 Cc: 80024 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.7 (-) >> Anyway here is the current implementation. It would be nice >> if you try and possibly rearrange the conditions inside >> 'minibuffer-visible-completions--filter' to find the most >> intuitive behavior. > > Actually on reflection I feel like just > > (keymap-set minibuffer-local-completion-map "<up>" #'minibuffer-previous-completion) > (keymap-set minibuffer-local-completion-map "<down>" #'minibuffer-next-completion) > > provides the best behavior. (with null minibuffer-visible-completions) > > It is unfortunate that this loses the ability to use up/down to navigate > history. But I guess all the non-default completion frontends lose that > ability too, so maybe it's fine. M-n and M-p are perfectly good ways to > navigate history. Hmm. Mnemonically <up> looks like the right key to pop up the completions buffer, but after displaying the buffer <up> moves to the last completion at the end of the buffer that would be confusing to users. Requesting to display the buffer explicitly with e.g <TAB> before navigating it would be more intuitive for users. And also up/down will retain their ability to navigate history before the completions are displayed. So we could still add an option 'up-down' to 'minibuffer-visible-completions'.
bug-gnu-emacs@HIDDEN:bug#80024; Package emacs.
Full text available.
Received: (at 80024) by debbugs.gnu.org; 22 Dec 2025 21:43:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 22 16:43:30 2025
Received: from localhost ([127.0.0.1]:50566 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1vXngg-0007rE-0n
for submit <at> debbugs.gnu.org; Mon, 22 Dec 2025 16:43:30 -0500
Received: from mxout5.mail.janestreet.com ([64.215.233.18]:58593)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from <sbaugh@HIDDEN>)
id 1vXngc-0007qs-SA
for 80024 <at> debbugs.gnu.org; Mon, 22 Dec 2025 16:43:28 -0500
From: Spencer Baugh <sbaugh@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#80024: 30.1.90; minibuffer-visible-completions always
rebinds left/right
In-Reply-To: <87v7i34ujm.fsf@HIDDEN> (Juri Linkov's message of "Thu,
18 Dec 2025 18:38:41 +0200")
References: <iersed9xbhg.fsf@HIDDEN> <87v7i34ujm.fsf@HIDDEN>
Date: Mon, 22 Dec 2025 16:43:21 -0500
Message-ID: <ierzf7ayyyu.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com;
s=waixah; t=1766439801;
bh=m7uwikTTnRZu9O9qfAmBKNJ4/ablnaW55plGJZjtHZk=;
h=From:To:Cc:Subject:In-Reply-To:References:Date;
b=cuwyN8H3rdTT+V9C4iI4EnRHddq+kbbYyMwq7OOao9hsnQIjDYCvTS/goiNKqQwjH
KdFo6Hl7USNrpYYdf9D/dzo+g95yNHyrigKmzS5gADqUs6ke1+F1F+o6Wu+onTGrPm
hfAYj1NMBK0ivG3HDLnpU1mDvfQvbFOq7DjSmki5Vn+ALFGv7MSX1eRscgitMCDSJl
uKks6N8l9tA+7OjWLT0E4RkLcwgWFJVNBhMYH18MCiTdVqEn0FSICUoKx8mrpqTDn4
a1DKU5Lhh/6smOxWcd+Ish10grJk9SONgOVDRf3sl+aQvcE6cmeCMXhFwa1bY0L1qo
Q+IaFwW+fyZOw==
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 80024
Cc: 80024 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)
Juri Linkov <juri@HIDDEN> writes:
>> It would be nice to have a version of minibuffer-visible-completions
>> which did not rebind <left>/<right> so that they could be used to
>> navigate in the minibuffer. This would in turn mean that <up>/<down>
>> would need to be bound to minibuffer-{previous,next}-completion so that
>> users can still navigate between all completions.
>>
>> The motivation is just that novice users find the rebinding of
>> <left>/<right> confusing, and don't find it intuitive to use C-g to
>> dismiss *Completions* and be able to use <left>/<right> again.
>>
>> While we're at it, I think it would be good for <up>/<down> to navigate
>> between completions when point is on the first/last line of the
>> minibuffer, respectively. Then all the usual arrow key bindings would
>> work for minibuffer navigation, while <up> and <down> are still usable
>> for navigating completions.
>
> Finding the most convenient behavior requires a lot of experimenting.
> I tried to implement all parts above, but the last part doesn't feel intuitive.
> For example, when completion is required in the middle of the multi-line
> minibuffer, it's expected that up/down will navigate the completions
> instead of navigating lines in the minibuffer.
Ah, that makes sense to me, right.
> Anyway here is the current implementation. It would be nice
> if you try and possibly rearrange the conditions inside
> 'minibuffer-visible-completions--filter' to find the most
> intuitive behavior.
Actually on reflection I feel like just
(keymap-set minibuffer-local-completion-map "<up>" #'minibuffer-previous-completion)
(keymap-set minibuffer-local-completion-map "<down>" #'minibuffer-next-completion)
provides the best behavior. (with null minibuffer-visible-completions)
It is unfortunate that this loses the ability to use up/down to navigate
history. But I guess all the non-default completion frontends lose that
ability too, so maybe it's fine. M-n and M-p are perfectly good ways to
navigate history. Hmm.
bug-gnu-emacs@HIDDEN:bug#80024; Package emacs.
Full text available.
Received: (at 80024) by debbugs.gnu.org; 18 Dec 2025 16:40:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 18 11:40:13 2025
Received: from localhost ([127.0.0.1]:55449 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1vWH2y-0001my-27
for submit <at> debbugs.gnu.org; Thu, 18 Dec 2025 11:40:12 -0500
Received: from mout-p-202.mailbox.org ([80.241.56.172]:34280)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1vWH2t-0001hM-2X
for 80024 <at> debbugs.gnu.org; Thu, 18 Dec 2025 11:40:07 -0500
Received: from smtp2.mailbox.org (smtp2.mailbox.org
[IPv6:2001:67c:2050:b231:465::2])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(No client certificate requested)
by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4dXGbz351jz9t6y;
Thu, 18 Dec 2025 17:39:59 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001;
t=1766075999;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
in-reply-to:in-reply-to:references:references;
bh=toeG4NPEW3VGH3ZFXMgRl5Kw94VLfhCWcyIOahGW90Q=;
b=Ss47B2Xd185tiKY+8jP+XPDhtib8CXmF8Tj1mQ0D4ffHcZy+p9wLhQ429Y8OXv4TJdZdwJ
bhZvMKXBKAzncMV0nhG9lasqbjp9dOT3ubkB+KhUQpy6te2UcH/P0oYS7kXaS7Qn7644O7
V8h2Kf7cJ7miMthl6IcO4KgNZeRrtYZLqVpu7vatLdoT9sH8xHNHAQ6leW6s1AZSFYVhxq
wG49DN6kloY7Q61zUaQCu/ZFgOuLO486B8Ywvua901WO1Fgc1Q1F1jPWbhxqplVLAR1LLb
8QsMrKIF9izguCwcJU9KFzjLq9chBjKICyKlTJlv/nlfYibrgzzVnup7mjbhaA==
Authentication-Results: outgoing_mbo_mout; dkim=none;
spf=pass (outgoing_mbo_mout: domain of juri@HIDDEN designates
2001:67c:2050:b231:465::2 as permitted sender) smtp.mailfrom=juri@HIDDEN
From: Juri Linkov <juri@HIDDEN>
To: Spencer Baugh <sbaugh@HIDDEN>
Subject: Re: bug#80024: 30.1.90; minibuffer-visible-completions always
rebinds left/right
In-Reply-To: <iersed9xbhg.fsf@HIDDEN>
Organization: LINKOV.NET
References: <iersed9xbhg.fsf@HIDDEN>
Date: Thu, 18 Dec 2025 18:38:41 +0200
Message-ID: <87v7i34ujm.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Rspamd-Queue-Id: 4dXGbz351jz9t6y
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 80024
Cc: 80024 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)
--=-=-=
Content-Type: text/plain
> It would be nice to have a version of minibuffer-visible-completions
> which did not rebind <left>/<right> so that they could be used to
> navigate in the minibuffer. This would in turn mean that <up>/<down>
> would need to be bound to minibuffer-{previous,next}-completion so that
> users can still navigate between all completions.
>
> The motivation is just that novice users find the rebinding of
> <left>/<right> confusing, and don't find it intuitive to use C-g to
> dismiss *Completions* and be able to use <left>/<right> again.
>
> While we're at it, I think it would be good for <up>/<down> to navigate
> between completions when point is on the first/last line of the
> minibuffer, respectively. Then all the usual arrow key bindings would
> work for minibuffer navigation, while <up> and <down> are still usable
> for navigating completions.
Finding the most convenient behavior requires a lot of experimenting.
I tried to implement all parts above, but the last part doesn't feel intuitive.
For example, when completion is required in the middle of the multi-line
minibuffer, it's expected that up/down will navigate the completions
instead of navigating lines in the minibuffer.
Anyway here is the current implementation. It would be nice
if you try and possibly rearrange the conditions inside
'minibuffer-visible-completions--filter' to find the most
intuitive behavior.
--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline;
filename=minibuffer-visible-completions-up-down.patch
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index 5727cf9f479..b82e92e60e4 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -3458,7 +3458,9 @@ minibuffer-visible-completions
If the *Completions* buffer is not displayed on the screen, or this
variable is nil, the arrow keys move point in the minibuffer as usual,
and `RET' accepts the input typed into the minibuffer."
- :type 'boolean
+ :type '(choice (const :tag "Disable completions navigation" nil)
+ (const :tag "Enable up/down/left/right" t)
+ (const :tag "Enable only up/down" up-down))
:version "30.1")
(defvar minibuffer-visible-completions--always-bind nil
@@ -3486,7 +3488,21 @@ minibuffer-visible-completions--filter
(if minibuffer-visible-completions--always-bind
cmd
(when-let* ((window (minibuffer--completions-visible)))
- cmd)))
+ (cond ((eq minibuffer-visible-completions 'up-down)
+ (when (and (or (not (eq (buffer-local-value
+ 'completions-format
+ (window-buffer window))
+ 'one-column))
+ (member (key-description
+ (vector last-input-event))
+ '("<up>" "<down>")))
+ (or
+ ;; On the first line
+ (not (zerop (save-excursion (forward-line -1))))
+ ;; On the last line
+ (not (zerop (save-excursion (forward-line 1))))))
+ cmd))
+ (t cmd)))))
(defun minibuffer-visible-completions--bind (binding)
"Use BINDING when completions are visible.
--=-=-=--
bug-gnu-emacs@HIDDEN:bug#80024; Package emacs.
Full text available.
Received: (at submit) by debbugs.gnu.org; 17 Dec 2025 17:30:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 17 12:30:21 2025
Received: from localhost ([127.0.0.1]:44958 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1vVvLw-0001OQ-M2
for submit <at> debbugs.gnu.org; Wed, 17 Dec 2025 12:30:21 -0500
Received: from lists.gnu.org ([2001:470:142::17]:41762)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from <sbaugh@HIDDEN>)
id 1vVvLt-0001Mr-Gh
for submit <at> debbugs.gnu.org; Wed, 17 Dec 2025 12:30:18 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from <sbaugh@HIDDEN>)
id 1vVvLl-00087Z-Ea
for bug-gnu-emacs@HIDDEN; Wed, 17 Dec 2025 12:30:10 -0500
Received: from mxout5.mail.janestreet.com ([64.215.233.18])
by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from <sbaugh@HIDDEN>)
id 1vVvLh-0000Ua-Pj
for bug-gnu-emacs@HIDDEN; Wed, 17 Dec 2025 12:30:08 -0500
From: Spencer Baugh <sbaugh@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 30.1.90; minibuffer-visible-completions always rebinds left/right
X-Debbugs-Cc: Juri Linkov <juri@HIDDEN>
Date: Wed, 17 Dec 2025 12:30:03 -0500
Message-ID: <iersed9xbhg.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com;
s=waixah; t=1765992603;
bh=vo5oXF0KUr0M2TPwXh+Xz7hBYxSCtr6N7g91cdKaCrA=;
h=From:To:Subject:Date;
b=oR4xIGpOxj5fGTfHEVvFO1Qs79TKmLlpqjJe7YufNWhV+f7NnHaYaMUQd9xu2R3/t
lTYetba7bi0WXNF40eybiAguq87jqdNlBj3bzujTpJOvgH0Mrzh+B6OyIutSO1JOKN
CtLsT3zOJnVWn/Zad8GmPIKn2/RQKB+s0sjhFFV91I4Qpbh4/CcRZoqBp9a3ml3GfZ
EXORf3wPLkFznIQvuWBBOU+w2H7ndXpeYQqF8xWJ3iPPRpHUoy5wuNoCz2BfnSrIbO
mosiCzib46GYUkF4WwJx1KwxHB4VHFIK4e/ltxR67OpzJRD2c6utXzBkqzccEUZMVh
Mrl9loN2Lppkw==
Received-SPF: pass client-ip=64.215.233.18; envelope-from=sbaugh@HIDDEN;
helo=mxout5.mail.janestreet.com
X-Spam_score_int: -27
X-Spam_score: -2.8
X-Spam_bar: --
X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001,
RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001,
SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.9 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.1 (/)
It would be nice to have a version of minibuffer-visible-completions
which did not rebind <left>/<right> so that they could be used to
navigate in the minibuffer. This would in turn mean that <up>/<down>
would need to be bound to minibuffer-{previous,next}-completion so that
users can still navigate between all completions.
The motivation is just that novice users find the rebinding of
<left>/<right> confusing, and don't find it intuitive to use C-g to
dismiss *Completions* and be able to use <left>/<right> again.
While we're at it, I think it would be good for <up>/<down> to navigate
between completions when point is on the first/last line of the
minibuffer, respectively. Then all the usual arrow key bindings would
work for minibuffer navigation, while <up> and <down> are still usable
for navigating completions.
In GNU Emacs 30.1.90 (build 90, x86_64-pc-linux-gnu, X toolkit, cairo
version 1.15.12, Xaw scroll bars) of 2025-12-04 built on
igm-qws-u22796a
Repository revision: 88878f209ee0f1699952b1ba5fb829c502f5959f
Repository branch: HEAD
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Rocky Linux 8.10 (Green Obsidian)
Configured using:
'configure --with-x-toolkit=lucid --without-gpm --without-gconf
--without-selinux --without-imagemagick --with-modules --with-gif=no
--with-cairo --with-rsvg --without-compress-install --with-tree-sitter
--with-native-compilation=aot
PKG_CONFIG_PATH=/usr/local/home/garnish/libtree-sitter/0.22.6-1/lib/pkgconfig/'
Configured features:
CAIRO DBUS FREETYPE GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG LIBSYSTEMD
LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP
SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER X11 XDBE XIM
XINPUT2 XPM LUCID ZLIB
Spencer Baugh <sbaugh@HIDDEN>:juri@HIDDEN, bug-gnu-emacs@HIDDEN.
Full text available.juri@HIDDEN, bug-gnu-emacs@HIDDEN:bug#80024; Package emacs.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.