all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#63913: [PATCH] * lisp/minibuffer.el (minibuffer-completion-help): Only ding when appropriate.
@ 2023-06-05 17:50 Morgan Smith
  2023-06-05 18:50 ` Eli Zaretskii
  0 siblings, 1 reply; 10+ messages in thread
From: Morgan Smith @ 2023-06-05 17:50 UTC (permalink / raw)
  To: 63913

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

Hello,

I think this patch is self-explanatory.  In order to get the ding you
have to "(setopt completion-auto-help 'visible)" and try to complete
something successfully.  I was doing 'M-x eshell-command-mo <TAB>' to
complete the symbol eshell-command-mode.

I'm not sure if that's actually the complete minimal setup, but I don't
think you guys have to bother reproducing it since it's pretty obvious
my patch is an improvement.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-lisp-minibuffer.el-minibuffer-completion-help-Only-d.patch --]
[-- Type: text/x-patch, Size: 1358 bytes --]

From 991ecaa8501a4eee8ab5073587462a0f7e36c488 Mon Sep 17 00:00:00 2001
From: Morgan Smith <Morgan.J.Smith@outlook.com>
Date: Mon, 5 Jun 2023 13:34:59 -0400
Subject: [PATCH] * lisp/minibuffer.el (minibuffer-completion-help): Only ding
 when appropriate.

(minibuffer-completion-help): Ensure ding is not called on a
successful completion.  Ensure ding is not called on a failure if
completion-fail-discreetly is set.  Also change "No completions" to
"No match" as that is what is used elsewhere.
---
 lisp/minibuffer.el | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index a1379913886..d26866370f1 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -2384,9 +2384,11 @@ These include:
           ;; If there are no completions, or if the current input is already
           ;; the sole completion, then hide (previous&stale) completions.
           (minibuffer-hide-completions)
-          (ding)
-          (completion--message
-           (if completions "Sole completion" "No completions")))
+          (if completions
+              (completion--message "Sole completion")
+            (unless completion-fail-discreetly
+	      (ding)
+	      (completion--message "No match"))))
 
       (let* ((last (last completions))
              (base-size (or (cdr last) 0))
-- 
2.40.1


[-- Attachment #3: Type: text/plain, Size: 17 bytes --]


Thanks,

Morgan

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-06-10 17:56 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-05 17:50 bug#63913: [PATCH] * lisp/minibuffer.el (minibuffer-completion-help): Only ding when appropriate Morgan Smith
2023-06-05 18:50 ` Eli Zaretskii
2023-06-05 19:09   ` Morgan Smith
2023-06-06 11:19     ` Eli Zaretskii
2023-06-06 19:08       ` Morgan Smith
2023-06-08  9:59         ` Eli Zaretskii
2023-06-08 16:54           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-10  9:13             ` Eli Zaretskii
2023-06-10 17:34               ` Morgan Smith
2023-06-10 17:56                 ` Eli Zaretskii

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.