From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Spencer Baugh Newsgroups: gmane.emacs.bugs Subject: bug#64425: [PATCH] Mention minibuffer-next-completion in completion-help Date: Thu, 06 Jul 2023 09:00:24 -0400 Message-ID: References: <4beb74b6-6bbc-4e0f-9b95-f95b7edf79b9@email.android.com> <83o7ktm8er.fsf@gnu.org> <83mt0dm7p5.fsf@gnu.org> <83h6qhiix6.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37307"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: sbaugh@catern.com, 64425@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jul 06 15:01:33 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qHOc0-0009XT-S8 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 06 Jul 2023 15:01:32 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qHObn-0003JK-M4; Thu, 06 Jul 2023 09:01:19 -0400 Original-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 ) id 1qHObY-0003Im-3s for bug-gnu-emacs@gnu.org; Thu, 06 Jul 2023 09:01:09 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qHObX-0001MY-EV for bug-gnu-emacs@gnu.org; Thu, 06 Jul 2023 09:01:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qHObW-0007bf-2x for bug-gnu-emacs@gnu.org; Thu, 06 Jul 2023 09:01:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Spencer Baugh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 06 Jul 2023 13:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64425 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 64425-submit@debbugs.gnu.org id=B64425.168864843929200 (code B ref 64425); Thu, 06 Jul 2023 13:01:02 +0000 Original-Received: (at 64425) by debbugs.gnu.org; 6 Jul 2023 13:00:39 +0000 Original-Received: from localhost ([127.0.0.1]:40368 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qHOb4-0007aq-UF for submit@debbugs.gnu.org; Thu, 06 Jul 2023 09:00:38 -0400 Original-Received: from mxout5.mail.janestreet.com ([64.215.233.18]:41469) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qHOaz-0007aY-S9 for 64425@debbugs.gnu.org; Thu, 06 Jul 2023 09:00:33 -0400 In-Reply-To: <83h6qhiix6.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 06 Jul 2023 10:43:49 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:264678 Archived-At: --=-=-= Content-Type: text/plain Eli Zaretskii writes: >> From: Spencer Baugh >> Cc: sbaugh@catern.com, 64425@debbugs.gnu.org >> Date: Mon, 03 Jul 2023 10:00:01 -0400 >> >> >> They are also available in regular buffers after triggering completion-at-point. Should we note that too? >> > >> > Yes, but in another place, where completion-at-point is documented. >> >> OK, fair enough. Actually, that part is already done, in (info "(emacs) >> Symbol Completion"). >> >> So revised patch updating the minibuffer completion documentation: > > Thanks, this LGTM, but please don't use 'kbd' in simple.el. With that > change, we can install this, I think. Fixed. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Mention-minibuffer-next-completion-in-completion-hel.patch >From 6724728e4b9608b98052b6690f659a355b2865e6 Mon Sep 17 00:00:00 2001 From: Spencer Baugh Date: Mon, 3 Jul 2023 09:59:04 -0400 Subject: [PATCH] Mention minibuffer-next-completion in completion-help Now that it's not necessary to switch to the *Completions* buffer to switch between and choose completions, we should make that clear in the help text. Let's also make the bindings uniform both in and outside the *Completions* buffer so users don't have to think about the difference. In working with new users, they've assumed that since the help text in *Completions* says "Click on a completion to select it", that that's the only way to select a completion. This text should help clarify that. * doc/emacs/mini.texi (Completion Commands): Document new bindings. * lisp/simple.el (completion-list-mode-map): Bind minibuffer-{next,previous,choose}-completion. (completion-setup-function): Mention bindings for minibuffer-{next,previous,choose}-completion. (Bug#64425) --- doc/emacs/mini.texi | 4 ++-- lisp/simple.el | 15 ++++++++++----- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/doc/emacs/mini.texi b/doc/emacs/mini.texi index a760ad19f2d..1080c3b6d27 100644 --- a/doc/emacs/mini.texi +++ b/doc/emacs/mini.texi @@ -399,7 +399,7 @@ Completion Commands @findex minibuffer-choose-completion @item M-@key{DOWN} @itemx M-@key{UP} -While in the minibuffer, @kbd{M-@key{DOWN}} +While in the minibuffer or in the completion list buffer, @kbd{M-@key{DOWN}} (@code{minibuffer-next-completion} and @kbd{M-@key{UP}} (@code{minibuffer-previous-completion}) navigate through the completions and displayed in the completions buffer. When @@ -419,7 +419,7 @@ Completion Commands @itemx @key{prior} Typing @kbd{M-v}, while in the minibuffer, selects the window showing the completion list (@code{switch-to-completions}). This paves the -way for using the commands below. @key{PageUp}, @key{prior} and +way for also using the commands below. @key{PageUp}, @key{prior} and @kbd{M-g M-c} does the same. You can also select the window in other ways (@pxref{Windows}). diff --git a/lisp/simple.el b/lisp/simple.el index 406f1008df3..2b1a015f517 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -9697,6 +9697,9 @@ completion-list-mode-map (define-key map [right] 'next-completion) (define-key map [?\t] 'next-completion) (define-key map [backtab] 'previous-completion) + (define-key map [M-up] 'minibuffer-previous-completion) + (define-key map [M-down] 'minibuffer-next-completion) + (define-key map "\M-\r" 'minibuffer-choose-completion) (define-key map "z" 'kill-current-buffer) (define-key map "n" 'next-completion) (define-key map "p" 'previous-completion) @@ -10091,11 +10094,13 @@ completion-setup-function ;; Maybe insert help string. (when completion-show-help (goto-char (point-min)) - (if (display-mouse-p) - (insert "Click on a completion to select it.\n")) - (insert (substitute-command-keys - "In this buffer, type \\[choose-completion] to \ -select the completion near point.\n\n")))))) + (insert (substitute-command-keys + (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"))) + (insert (substitute-command-keys + "Type \\[minibuffer-next-completion] or \\[minibuffer-previous-completion] \ +to move point between completions.\n\n")))))) (add-hook 'completion-setup-hook #'completion-setup-function) -- 2.39.3 --=-=-=--