From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: sbaugh@catern.com Newsgroups: gmane.emacs.bugs Subject: bug#64425: [PATCH] Mention minibuffer-next-completion in completion-help Date: Sun, 02 Jul 2023 19:14:06 +0000 (UTC) Message-ID: <873526rurm.fsf@catern.com> References: <87y1jygtra.fsf@catern.com> <837crinsho.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="21675"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 64425@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jul 02 21:15:08 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 1qG2XL-0005OC-A4 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 02 Jul 2023 21:15:08 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qG2XI-0004lj-VL; Sun, 02 Jul 2023 15:15:04 -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 1qG2XH-0004h9-AT for bug-gnu-emacs@gnu.org; Sun, 02 Jul 2023 15:15:03 -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 1qG2XH-0000FE-0a for bug-gnu-emacs@gnu.org; Sun, 02 Jul 2023 15:15:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qG2XG-0004VF-K6 for bug-gnu-emacs@gnu.org; Sun, 02 Jul 2023 15:15:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: sbaugh@catern.com Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 02 Jul 2023 19:15: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.168832525617038 (code B ref 64425); Sun, 02 Jul 2023 19:15:02 +0000 Original-Received: (at 64425) by debbugs.gnu.org; 2 Jul 2023 19:14:16 +0000 Original-Received: from localhost ([127.0.0.1]:32805 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qG2WV-0004Qj-Jq for submit@debbugs.gnu.org; Sun, 02 Jul 2023 15:14:16 -0400 Original-Received: from s.wrqvtbkv.outbound-mail.sendgrid.net ([149.72.123.24]:51582) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qG2WS-0004QT-HC for 64425@debbugs.gnu.org; Sun, 02 Jul 2023 15:14:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=catern.com; h=from:subject:in-reply-to:references:mime-version:to:cc:content-type: cc:content-type:from:subject:to; s=s1; bh=+iQmj3zBP0Y0lp2GjOjqjKQRbQ+hxti2NH9Lt52l+us=; b=VI4EpEHwSfwLf46Tcs6L/Eo2PQptwMxHFqUv+3TuaRhILm9KVrSkXbNpNoveoQPPId4B GWZIYX6S1QUyWZVRB0VmC7kab9kHB79ArSMMlvq4j3tevsqHqTyZEy8SHbt9sAoJtXoKNs 4c16PGGQkkohFHIGsgzA07F0Bbi5Gk+ecluLTLRkvt8kF8bxjxanXg14ZLLJVYH4uFuS9I odx/1IUONtXq9keOjmqoMtnd4niC0cGIaAG7I6Kigstxka/2qbiNsDk7fgWXVq0ytcmhpl gbz0jJQYCBQe8luZYp7BHQRoHEaBoCg0rYHA9ZyFkiUGVue8gLr+MxI459n39KAQ== Original-Received: by filterdrecv-66949dbc98-2wdbb with SMTP id filterdrecv-66949dbc98-2wdbb-1-64A1CC7E-5 2023-07-02 19:14:06.158658107 +0000 UTC m=+4563253.445906510 Original-Received: from earth.catern.com (unknown) by geopod-ismtpd-12 (SG) with ESMTP id JyWnPG7AQqqS43pPBgBktw Sun, 02 Jul 2023 19:14:05.999 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=::1; helo=localhost; envelope-from=sbaugh@catern.com; receiver=gnu.org Original-Received: from localhost (localhost [IPv6:::1]) by earth.catern.com (Postfix) with ESMTPSA id 77A886001E; Sun, 2 Jul 2023 15:14:05 -0400 (EDT) In-Reply-To: <837crinsho.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 02 Jul 2023 20:16:51 +0300") X-SG-EID: ZgbRq7gjGrt0q/Pjvxk7wM0yQFRdOkTJAtEbkjCkHbIU1UAQ126pKMSvg061sN+EcZ1CEA8q9OASV1UmXnHux0SAgJsLrLf/Vc3v19Vt0urAYHtSYGEVPYlHRxHU6mUQ+4U+vZrXCBV8XUQalNgEKh2dX0mNJgP2OQ1bFTi8kJC9NyPkzF+tGK6T4+HX/4bR44Xj0AD0vqBhPsvBue/Odg== X-Entity-ID: d/0VcHixlS0t7iB1YKCv4Q== 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:264497 Archived-At: --=-=-= Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Eli Zaretskii writes: >> From: sbaugh@catern.com >> Date: Sun, 02 Jul 2023 16:31:21 +0000 (UTC) >> >> * lisp/simple.el (completion-list-mode-map): Bind >> minibuffer-{next,previous,choose}-completion. >> (completion-setup-function): Mention bindings for >> minibuffer-{next,previous,choose}-completion. >> --- >> lisp/simple.el | 7 +++++-- >> 1 file changed, 5 insertions(+), 2 deletions(-) >> >> diff --git a/lisp/simple.el b/lisp/simple.el >> index 406f1008df3..59e1311eb2b 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 (kbd "M-") 'minibuffer-previous-completion) >> + (define-key map (kbd "M-") 'minibuffer-next-completion) >> + (define-key map (kbd "M-RET") 'minibuffer-choose-completion) >> (define-key map "z" 'kill-current-buffer) >> (define-key map "n" 'next-completion) >> (define-key map "p" 'previous-completion) >> @@ -10093,8 +10096,8 @@ completion-setup-function >> (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 \ >> + (insert (substitute-command-keys >> + "Type \\[minibuffer-next-completion] and \\[minibuffer-previous-completion] to change completion, and \\[minibuffer-choose-completion] to \ >> select the completion near point.\n\n")))))) > > Isn't this text too long for a single screen line? If so, it will > cause an annoying "jumping" of the mode line. Good point, how about this wording: diff --git a/lisp/simple.el b/lisp/simple.el index 406f1008df3..26944f1f72d 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -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) Associated patch: --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Mention-minibuffer-next-completion-in-completion-hel.patch >From d551dd05ce14fbc950b98965e456bdac253650d0 Mon Sep 17 00:00:00 2001 From: Spencer Baugh Date: Sun, 2 Jul 2023 12:30:00 -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. * 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) --- lisp/simple.el | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/lisp/simple.el b/lisp/simple.el index 406f1008df3..26944f1f72d 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 (kbd "M-") 'minibuffer-previous-completion) + (define-key map (kbd "M-") 'minibuffer-next-completion) + (define-key map (kbd "M-RET") '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.41.0 --=-=-= Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit > Also, what about updating the documentation? All the other relevant documentation that I know about has already been updated to mention minibuffer-{next,previous,choose}-completion. --=-=-=--