all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Spencer Baugh <sbaugh@janestreet.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: sbaugh@catern.com, 64425@debbugs.gnu.org
Subject: bug#64425: [PATCH] Mention minibuffer-next-completion in completion-help
Date: Thu, 06 Jul 2023 09:00:24 -0400	[thread overview]
Message-ID: <ierv8exi49j.fsf@janestreet.com> (raw)
In-Reply-To: <83h6qhiix6.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 06 Jul 2023 10:43:49 +0300")

[-- Attachment #1: Type: text/plain, Size: 671 bytes --]

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Spencer Baugh <sbaugh@janestreet.com>
>> 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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Mention-minibuffer-next-completion-in-completion-hel.patch --]
[-- Type: text/x-patch, Size: 3637 bytes --]

From 6724728e4b9608b98052b6690f659a355b2865e6 Mon Sep 17 00:00:00 2001
From: Spencer Baugh <sbaugh@janestreet.com>
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


  reply	other threads:[~2023-07-06 13:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4beb74b6-6bbc-4e0f-9b95-f95b7edf79b9@email.android.com>
2023-07-03 13:28 ` bug#64425: [PATCH] Mention minibuffer-next-completion in completion-help Eli Zaretskii
2023-07-03 13:31   ` Spencer Baugh
2023-07-03 13:43     ` Eli Zaretskii
2023-07-03 14:00       ` Spencer Baugh
2023-07-06  7:43         ` Eli Zaretskii
2023-07-06 13:00           ` Spencer Baugh [this message]
2023-07-08  9:53             ` Eli Zaretskii
     [not found] <e7933bfa-c6e1-4586-b9f0-8bc3555329ef@email.android.com>
2023-07-08 13:51 ` Eli Zaretskii
2023-07-02 16:31 sbaugh
2023-07-02 17:16 ` Eli Zaretskii
2023-07-02 19:14   ` sbaugh
2023-07-03 11:21     ` Eli Zaretskii
2023-07-03 12:53       ` Spencer Baugh
2023-07-03 13:16         ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ierv8exi49j.fsf@janestreet.com \
    --to=sbaugh@janestreet.com \
    --cc=64425@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=sbaugh@catern.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.