GNU bug report logs - #59486
completion-auto-wrap disobeyed by vertical navigation

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Juri Linkov <juri@HIDDEN>; dated Tue, 22 Nov 2022 17:46:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 59486 <at> debbugs.gnu.org:


Received: (at 59486) by debbugs.gnu.org; 24 Nov 2022 18:43:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 24 13:43:48 2022
Received: from localhost ([127.0.0.1]:60142 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oyHCO-0001C5-2j
	for submit <at> debbugs.gnu.org; Thu, 24 Nov 2022 13:43:48 -0500
Received: from eggs.gnu.org ([209.51.188.92]:33430)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1oyHCL-0001Bs-LA
 for 59486 <at> debbugs.gnu.org; Thu, 24 Nov 2022 13:43:46 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1oyHCF-0007Ny-QE; Thu, 24 Nov 2022 13:43:40 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=mGlSQPNsd+dn6XZ83yNmJLAxmLdKAko3QGx3mcmox3Q=; b=khpVa/L5GiCG
 odn2y6b/6St3F32ufyhLU3yf20OdamfFEacqFx9P91W6D/N3uEeEC9lXaIKegG2qT19U2JM3OP9EN
 Qlp4phk3jaJLKzBt9U3tp4olnojpOpKOuCTDT1NQpGhRz9hFHJCzipfTWu+RKi6fXKSxa500zUYOo
 9yiygPPyBSo32XHHWCZLgA+z8u72fpVehhsVUsvF4n/HDOiN9yUJ0IapXOi4laaQwwe/Ce92kmsfY
 brHI9IpNFtQNmVGMTjbp95ioB5xUxEH7PfcNzR4DJ+DF1ytC6C4/YNV27nQ0HAzxEvfA9ICFURf3i
 wzOUm/rf00ot7Wzx3am4EQ==;
Received: from [87.69.77.57] (helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1oyHCD-00046T-Db; Thu, 24 Nov 2022 13:43:38 -0500
Date: Thu, 24 Nov 2022 20:43:58 +0200
Message-Id: <83zgcgur9t.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
In-Reply-To: <86pmdcw6hj.fsf@HIDDEN> (message from Juri Linkov on
 Thu, 24 Nov 2022 20:30:00 +0200)
Subject: Re: bug#59486: completion-auto-wrap disobeyed by vertical navigation
References: <8635aayjm6.fsf@HIDDEN> <86zgchbj61.fsf@HIDDEN>
 <86h6yoye87.fsf@HIDDEN> <834juoydlv.fsf@HIDDEN>
 <86pmdcw6hj.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 59486
Cc: 59486 <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 (---)

> From: Juri Linkov <juri@HIDDEN>
> Cc: 59486 <at> debbugs.gnu.org
> Date: Thu, 24 Nov 2022 20:30:00 +0200
> 
> > I don't really understand the difference between minibuffer-previous-* and
> > minibuffer-previous-line-* commands (the available documentation is minimal
> > and doesn't explain this difference), so it's hard to suggest an alternative.
> 
> minibuffer-previous-* are intended to navigate the completion list
> horizontally while the minibuffer is active, and minibuffer-previous-line-*
> vertically.

Then the names could be simplified as minibuffer-up-line and
minibuffer-down-line.  It will also make the names less confusing, IMO.

> > But one immediate alternative is to use <LEFT> and <RIGHT> for
> > the minibuffer-previous-* family, like previous-completion does.
> 
> <LEFT> and <RIGHT> are useful to move point in the minibuffer.

Then maybe PgUp and PgDn?

> But do you think it would be okay to use <LEFT> and <RIGHT>
> for navigation of completions from the minibuffer after
> adding a new user option, when is non-nil (disabled by default)?

If the arrow keys are already taken, having an option that will change their
effect would be confusing, I think.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#59486; Package emacs. Full text available.

Message received at 59486 <at> debbugs.gnu.org:


Received: (at 59486) by debbugs.gnu.org; 24 Nov 2022 18:34:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 24 13:34:43 2022
Received: from localhost ([127.0.0.1]:60098 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oyH3b-0000wt-MC
	for submit <at> debbugs.gnu.org; Thu, 24 Nov 2022 13:34:43 -0500
Received: from relay8-d.mail.gandi.net ([217.70.183.201]:51697)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1oyH3K-0000wP-VY
 for 59486 <at> debbugs.gnu.org; Thu, 24 Nov 2022 13:34:42 -0500
Received: (Authenticated sender: juri@HIDDEN)
 by mail.gandi.net (Postfix) with ESMTPSA id 9DB371BF206;
 Thu, 24 Nov 2022 18:34:17 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#59486: completion-auto-wrap disobeyed by vertical navigation
In-Reply-To: <834juoydlv.fsf@HIDDEN> (Eli Zaretskii's message of "Thu, 24 Nov
 2022 10:13:16 +0200")
Organization: LINKOV.NET
References: <8635aayjm6.fsf@HIDDEN> <86zgchbj61.fsf@HIDDEN>
 <86h6yoye87.fsf@HIDDEN> <834juoydlv.fsf@HIDDEN>
Date: Thu, 24 Nov 2022 20:30:00 +0200
Message-ID: <86pmdcw6hj.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 59486
Cc: 59486 <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 (-)

> I don't really understand the difference between minibuffer-previous-* and
> minibuffer-previous-line-* commands (the available documentation is minimal
> and doesn't explain this difference), so it's hard to suggest an alternative.

minibuffer-previous-* are intended to navigate the completion list
horizontally while the minibuffer is active, and minibuffer-previous-line-*
vertically.

> But one immediate alternative is to use <LEFT> and <RIGHT> for
> the minibuffer-previous-* family, like previous-completion does.

<LEFT> and <RIGHT> are useful to move point in the minibuffer.
But do you think it would be okay to use <LEFT> and <RIGHT>
for navigation of completions from the minibuffer after
adding a new user option, when is non-nil (disabled by default)?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#59486; Package emacs. Full text available.

Message received at 59486 <at> debbugs.gnu.org:


Received: (at 59486) by debbugs.gnu.org; 24 Nov 2022 08:13:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 24 03:13:21 2022
Received: from localhost ([127.0.0.1]:57128 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oy7MH-0004Zt-IF
	for submit <at> debbugs.gnu.org; Thu, 24 Nov 2022 03:13:21 -0500
Received: from eggs.gnu.org ([209.51.188.92]:42766)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1oy7MF-0004Zg-NT
 for 59486 <at> debbugs.gnu.org; Thu, 24 Nov 2022 03:13:20 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1oy7M9-0006nX-2N; Thu, 24 Nov 2022 03:13:13 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=uG/aRGmBM022bDUKnaxhMF3cUQbb7gjsWqsCKnJ051s=; b=avuHlmsHWUHs
 0x83/jLv/7K1MvADRtb6n1qP7Q6yJC53sm1McEleve7UiW5NbhhqjLSEzmHqaRfGBVbG670t7DMnw
 plCRRIMqQaHVkRdkM45wDm4BzRA83xsxV+mo4E6df7J6d+NdF1/TqVEH14grCSMHrCBro6yexkIuV
 hNKA92guA7JuWoPWhz9ppe4/juavTcWXvoovge2Cgl2SFWw4GnxxL35pM+kp6c8QZeOkRavSKiIYs
 LRh8sbo2nSGpyqtiRXy6/YTOt5wOlyHroyGqgcaA3UCxMdzhhkI2ffjfZWkD6WP0ZvXEDkCxyPt9s
 Os6jJfHbp64Cu3ZrJwNCEQ==;
Received: from [87.69.77.57] (helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1oy7Lt-0003Aw-Sj; Thu, 24 Nov 2022 03:13:12 -0500
Date: Thu, 24 Nov 2022 10:13:16 +0200
Message-Id: <834juoydlv.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
In-Reply-To: <86h6yoye87.fsf@HIDDEN> (message from Juri Linkov on
 Thu, 24 Nov 2022 09:59:52 +0200)
Subject: Re: bug#59486: completion-auto-wrap disobeyed by vertical navigation
References: <8635aayjm6.fsf@HIDDEN> <86zgchbj61.fsf@HIDDEN>
 <86h6yoye87.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 59486
Cc: 59486 <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 (---)

> From: Juri Linkov <juri@HIDDEN>
> Date: Thu, 24 Nov 2022 09:59:52 +0200
> 
> > And here are the corresponding commands for navigating
> > the completions buffer from the minibuffer:
> >
> > +(defun minibuffer-next-line-completion (&optional n)
> > +(defun minibuffer-previous-line-completion (&optional n)
> 
> It seems there commands can't be bound in the minibuffer.
> Ideally, these keybindings could be added to
> minibuffer-local-completion-map:
> 
>   "M-<left>"  #'minibuffer-previous-completion
>   "M-<right>" #'minibuffer-next-completion
>   "M-<up>"    #'minibuffer-previous-line-completion
>   "M-<down>"  #'minibuffer-next-line-completion
> 
> But maybe 'M-<left>' and 'M-<right>' can't be taken from moving by words
> even when 'C-<left>' and 'C-<right>' are duplicate keys that are doing
> the same.  Or to bind 'M-<left>' and 'M-<right>' only in
> completion-in-region-mode-map that is more transient by nature
> and is active only as long as the completions buffer is shown.

Please don't usurp M-<LEFT> and M-<RIGHT>, as they are needed on TTY frames
where C-<LEFT> and C-<RIGHT> are not available.

I don't really understand the difference between minibuffer-previous-* and
minibuffer-previous-line-* commands (the available documentation is minimal
and doesn't explain this difference), so it's hard to suggest an
alternative.  But one immediate alternative is to use <LEFT> and <RIGHT> for
the minibuffer-previous-* family, like previous-completion does.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#59486; Package emacs. Full text available.

Message received at 59486 <at> debbugs.gnu.org:


Received: (at 59486) by debbugs.gnu.org; 24 Nov 2022 08:02:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 24 03:02:17 2022
Received: from localhost ([127.0.0.1]:57103 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oy7BZ-0004JC-78
	for submit <at> debbugs.gnu.org; Thu, 24 Nov 2022 03:02:17 -0500
Received: from relay2-d.mail.gandi.net ([217.70.183.194]:37365)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1oy7BW-0004Im-W0
 for 59486 <at> debbugs.gnu.org; Thu, 24 Nov 2022 03:02:15 -0500
Received: (Authenticated sender: juri@HIDDEN)
 by mail.gandi.net (Postfix) with ESMTPSA id 52A204000C
 for <59486 <at> debbugs.gnu.org>; Thu, 24 Nov 2022 08:02:07 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: 59486 <at> debbugs.gnu.org
Subject: Re: bug#59486: completion-auto-wrap disobeyed by vertical navigation
In-Reply-To: <86zgchbj61.fsf@HIDDEN> (Juri Linkov's message of "Wed, 
 23 Nov 2022 20:49:27 +0200")
Organization: LINKOV.NET
References: <8635aayjm6.fsf@HIDDEN> <86zgchbj61.fsf@HIDDEN>
Date: Thu, 24 Nov 2022 09:59:52 +0200
Message-ID: <86h6yoye87.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 59486
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 (-)

> And here are the corresponding commands for navigating
> the completions buffer from the minibuffer:
>
> +(defun minibuffer-next-line-completion (&optional n)
> +(defun minibuffer-previous-line-completion (&optional n)

It seems there commands can't be bound in the minibuffer.
Ideally, these keybindings could be added to
minibuffer-local-completion-map:

  "M-<left>"  #'minibuffer-previous-completion
  "M-<right>" #'minibuffer-next-completion
  "M-<up>"    #'minibuffer-previous-line-completion
  "M-<down>"  #'minibuffer-next-line-completion

But maybe 'M-<left>' and 'M-<right>' can't be taken from moving by words
even when 'C-<left>' and 'C-<right>' are duplicate keys that are doing
the same.  Or to bind 'M-<left>' and 'M-<right>' only in
completion-in-region-mode-map that is more transient by nature
and is active only as long as the completions buffer is shown.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#59486; Package emacs. Full text available.

Message received at 59486 <at> debbugs.gnu.org:


Received: (at 59486) by debbugs.gnu.org; 23 Nov 2022 18:50:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 23 13:50:36 2022
Received: from localhost ([127.0.0.1]:56248 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oxupQ-0004cY-C0
	for submit <at> debbugs.gnu.org; Wed, 23 Nov 2022 13:50:36 -0500
Received: from relay9-d.mail.gandi.net ([217.70.183.199]:44459)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1oxupJ-0004c8-Ta
 for 59486 <at> debbugs.gnu.org; Wed, 23 Nov 2022 13:50:34 -0500
Received: (Authenticated sender: juri@HIDDEN)
 by mail.gandi.net (Postfix) with ESMTPSA id 97CDAFF804
 for <59486 <at> debbugs.gnu.org>; Wed, 23 Nov 2022 18:50:21 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: 59486 <at> debbugs.gnu.org
Subject: Re: bug#59486: completion-auto-wrap disobeyed by vertical navigation
In-Reply-To: <8635aayjm6.fsf@HIDDEN> (Juri Linkov's message of "Tue, 
 22 Nov 2022 19:38:57 +0200")
Organization: LINKOV.NET
References: <8635aayjm6.fsf@HIDDEN>
Date: Wed, 23 Nov 2022 20:49:27 +0200
Message-ID: <86zgchbj61.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 59486
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

> In a multi-column layout, the keys <left> and <right>
> wrap to the beginning/end of the completions buffer,
> but <up> and <down> don't.  Here is a patch that supports
> completion-auto-wrap for wrapping to the top/bottom:

Now pushed.  And here are the corresponding commands for
navigating the completions buffer from the minibuffer:


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline; filename=minibuffer-next-completion.patch

diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index 6bb0fa3ae98..ea1e88c7234 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -4452,7 +4456,7 @@ minibuffer-completion-auto-choose
   :type 'boolean
   :version "29.1")
 
-(defun minibuffer-next-completion (&optional n)
+(defun minibuffer-next-completion (&optional n vertical)
   "Move to the next item in its completions window from the minibuffer.
 When `minibuffer-completion-auto-choose' is non-nil, then also
 insert the selected completion to the minibuffer."
@@ -4461,7 +4465,9 @@ minibuffer-next-completion
     (with-minibuffer-completions-window
       (when completions-highlight-face
         (setq-local cursor-face-highlight-nonselected-window t))
-      (next-completion (or n 1))
+      (if vertical
+          (next-line-completion (or n 1))
+        (next-completion (or n 1)))
       (when auto-choose
         (let ((completion-use-base-affixes t))
           (choose-completion nil t t))))))
@@ -4473,6 +4479,20 @@ minibuffer-previous-completion
   (interactive "p")
   (minibuffer-next-completion (- (or n 1))))
 
+(defun minibuffer-next-line-completion (&optional n)
+  "Move to the next completion line from the minibuffer.
+When `minibuffer-completion-auto-choose' is non-nil, then also
+insert the selected completion to the minibuffer."
+  (interactive "p")
+  (minibuffer-next-completion (or n 1) t))
+
+(defun minibuffer-previous-line-completion (&optional n)
+  "Move to the previous completion line from the minibuffer.
+When `minibuffer-completion-auto-choose' is non-nil, then also
+insert the selected completion to the minibuffer."
+  (interactive "p")
+  (minibuffer-next-completion (- (or n 1)) t))
+
 (defun minibuffer-choose-completion (&optional no-exit no-quit)
   "Run `choose-completion' from the minibuffer in its completions window.
 With prefix argument NO-EXIT, insert the completion at point to the

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#59486; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 22 Nov 2022 17:45:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 22 12:45:39 2022
Received: from localhost ([127.0.0.1]:52476 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oxXL1-0003fV-Hq
	for submit <at> debbugs.gnu.org; Tue, 22 Nov 2022 12:45:39 -0500
Received: from lists.gnu.org ([209.51.188.17]:59244)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1oxXL0-0003fO-2K
 for submit <at> debbugs.gnu.org; Tue, 22 Nov 2022 12:45:38 -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 <juri@HIDDEN>) id 1oxXKx-0000Di-7E
 for bug-gnu-emacs@HIDDEN; Tue, 22 Nov 2022 12:45:37 -0500
Received: from relay10.mail.gandi.net ([217.70.178.230])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <juri@HIDDEN>) id 1oxXKu-0005Lt-5F
 for bug-gnu-emacs@HIDDEN; Tue, 22 Nov 2022 12:45:34 -0500
Received: (Authenticated sender: juri@HIDDEN)
 by mail.gandi.net (Postfix) with ESMTPSA id 6335324000E
 for <bug-gnu-emacs@HIDDEN>; Tue, 22 Nov 2022 17:44:56 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: completion-auto-wrap disobeyed by vertical navigation
Organization: LINKOV.NET
Date: Tue, 22 Nov 2022 19:38:57 +0200
Message-ID: <8635aayjm6.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
Received-SPF: pass client-ip=217.70.178.230; envelope-from=juri@HIDDEN;
 helo=relay10.mail.gandi.net
X-Spam_score_int: -25
X-Spam_score: -2.6
X-Spam_bar: --
X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.6 (-)
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: -2.6 (--)

--=-=-=
Content-Type: text/plain

In a multi-column layout, the keys <left> and <right>
wrap to the beginning/end of the completions buffer,
but <up> and <down> don't.  Here is a patch that supports
completion-auto-wrap for wrapping to the top/bottom:


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline; filename=next-line-completion.patch

diff --git a/lisp/simple.el b/lisp/simple.el
index 0f44b14948c..459af2fcf55 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -9572,6 +9574,8 @@ completion-list-mode-map
     (define-key map "\C-m" 'choose-completion)
     (define-key map "\e\e\e" 'delete-completion-window)
     (define-key map [remap keyboard-quit] #'delete-completion-window)
+    (define-key map [up] 'previous-line-completion)
+    (define-key map [down] 'next-line-completion)
     (define-key map [left] 'previous-completion)
     (define-key map [right] 'next-completion)
     (define-key map [?\t] 'next-completion)
@@ -9736,6 +9740,77 @@ next-completion
     (when (/= 0 n)
       (switch-to-minibuffer))))
 
+(defun previous-line-completion (&optional n)
+  "Move to the item on the previous line in the completion list.
+With prefix argument N, move back N items line-wise (negative N
+means move forward).
+
+Also see the `completion-auto-wrap' variable."
+  (interactive "p")
+  (next-line-completion (- n)))
+
+(defun next-line-completion (&optional n)
+  "Move to the item on the next line in the completion list.
+With prefix argument N, move N items line-wise (negative N
+means move backward).
+
+Also see the `completion-auto-wrap' variable."
+  (interactive "p")
+  (let ((column (current-column))
+        pos)
+    (catch 'bound
+      (while (> n 0)
+        (setq pos nil)
+        (save-excursion
+          (while (and (not pos) (not (eobp)))
+            (forward-line 1)
+            (when (and (not (eobp))
+                       (eq (move-to-column column) column)
+                       (get-text-property (point) 'mouse-face))
+              (setq pos (point)))))
+        (if pos
+            (goto-char pos)
+          (when completion-auto-wrap
+            (let ((column (current-column)))
+              (save-excursion
+                (goto-char (point-min))
+                (when (and (eq (move-to-column column) column)
+                           (get-text-property (point) 'mouse-face))
+                  (setq pos (point)))
+                (while (and (not pos) (not (eobp)))
+                  (forward-line 1)
+                  (when (and (eq (move-to-column column) column)
+                             (get-text-property (point) 'mouse-face))
+                    (setq pos (point)))))
+              (if pos (goto-char pos)))))
+        (setq n (1- n)))
+
+      (while (< n 0)
+        (setq pos nil)
+        (save-excursion
+          (while (and (not pos) (not (bobp)))
+            (forward-line -1)
+            (when (and (not (bobp))
+                       (eq (move-to-column column) column)
+                       (get-text-property (point) 'mouse-face))
+              (setq pos (point)))))
+        (if pos
+            (goto-char pos)
+          (when completion-auto-wrap
+            (let ((column (current-column)))
+              (save-excursion
+                (goto-char (point-max))
+                (when (and (eq (move-to-column column) column)
+                           (get-text-property (point) 'mouse-face))
+                  (setq pos (point)))
+                (while (and (not pos) (not (bobp)))
+                  (forward-line -1)
+                  (when (and (eq (move-to-column column) column)
+                             (get-text-property (point) 'mouse-face))
+                    (setq pos (point)))))
+              (if pos (goto-char pos)))))
+        (setq n (1+ n))))))
+
 (defun choose-completion (&optional event no-exit no-quit)
   "Choose the completion at point.
 If EVENT, use EVENT's position to determine the starting position.

--=-=-=--




Acknowledgement sent to Juri Linkov <juri@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#59486; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Thu, 24 Nov 2022 18:45:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.