Subject: Re: bug#19013: 25.0.50; Suggestions for M-x commands

From: Ivan Shmakov <[email-masked]>
Date: Wed, 19 Nov 2014 07:14:52 +0000

>>>>> Lars Magne Ingebrigtsen <[email-masked]> writes:

 > I just typed `M-x eww RET foo RET', and after displaying the search
 > results, Emacs helpfully said

 > You can run the command `eww' with M-x ew RET

 > I don't think that's particularly helpful, actually.  Just
 > distracting.

	And even more so, – M-x beginning-of-visual-line RET; then,
	after some time, – M-x <up> RET – the same message gets shown,
	even though M-x <up> is for sure shorter than M-x b-v.

	I believe there should be a variable to customize this behavior
	(say, suggest-shorter-command-limit; defaulting to 5, but with
	nil as an option to disable such suggestions altogether.)  As a
	workaround, I’ve simply disabled it entirely (see the patch
	MIMEd.)

-- 
FSF associate member #7257  np. Epilogue (Relief) — Apocalyptica    … 230E 334A
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -1680,7 +1680,7 @@ defun execute-extended-command (prefixarg &optional command-name typed)
                       ((numberp suggest-key-bindings) suggest-key-bindings)
                       (t 2)))))
       (when (and waited (not (consp unread-command-events)))
-        (unless (or binding executing-kbd-macro (not (symbolp function))
+        (unless (or t binding executing-kbd-macro (not (symbolp function))
                     (<= (length (symbol-name function)) 2))
           ;; There's no binding for CMD.  Let's try and find the shortest
           ;; string to use in M-x.