From: Ivan Shmakov <ivan@siamics.net>
To: 19152@debbugs.gnu.org
Subject: bug#19152: 25.0.50; Suggestions for M-x commands
Date: Tue, 25 Nov 2014 18:10:40 +0000 [thread overview]
Message-ID: <87tx1nqhgf.fsf@violet.siamics.net> (raw)
In-Reply-To: <83ioi3p6jv.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 25 Nov 2014 18:51:32 +0200")
[-- Attachment #1: Type: text/plain, Size: 1012 bytes --]
>>>>> Eli Zaretskii <eliz@gnu.org> writes:
>>>>> From: Ivan Shmakov Date: Tue, 25 Nov 2014 15:45:18 +0000
>>>>> Stefan Monnier <monnier@IRO.UMontreal.CA> writes:
>>>>> An option to turn the feature off is fine. An option to choose
>>>>> the number of chars we have to gain is not.
>>>> Why not?
>>> Because that exposes too much irrelevant details.
>> I see no big difference between suggest-key-bindings’ seconds and
>> the suggested suggest-shorter-command-limit’s characters.
> Would you please rework your patch to make the option a simple
> predicate that turns this feature on and off,
Sure…
> and call it some name that begins with extended-command?
… Even though that’s inconsistent with the name of the existing
suggest-key-bindings option?…
> I think there's a consensus that such an option is OK.
> Thanks.
… Please consider the patch MIMEd.
--
FSF associate member #7257 http://boycottsystemd.org/ … 3013 B6A0 230E 334A
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/diff, Size: 1073 bytes --]
--- a/lisp/simple.el 2014-11-21 09:21:50 +0000
+++ b/lisp/simple.el
@@ -1598,6 +1598,11 @@
(integer :tag "time" 2)
(other :tag "on")))
+(defcustom extended-command-suggest-shorter t
+ "Non-nil means show a shorter M-x invocation when there is one."
+ :group 'keyboard
+ :type 'boolean)
+
(defun execute-extended-command--shorter-1 (name length)
(cond
((zerop length) (list ""))
@@ -1680,7 +1685,8 @@ 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 (not extended-command-suggest-shorter)
+ 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.
next prev parent reply other threads:[~2014-11-25 18:10 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-10 21:51 bug#19013: 25.0.50; Suggestions for M-x commands Lars Magne Ingebrigtsen
2014-11-11 1:38 ` Stefan Monnier
2014-11-11 2:08 ` Jay Belanger
2014-11-11 4:01 ` Stefan Monnier
2014-11-11 2:45 ` Lars Magne Ingebrigtsen
2014-11-16 19:39 ` Lars Magne Ingebrigtsen
2014-11-16 19:41 ` Lars Magne Ingebrigtsen
2014-11-19 7:14 ` Ivan Shmakov
2014-11-23 11:50 ` bug#19152: " Ivan Shmakov
2014-11-24 4:11 ` Stefan Monnier
2014-11-24 7:01 ` bug#19013: bug#19152: " Ivan Shmakov
2014-11-24 14:57 ` bug#19152: " Stefan Monnier
2014-11-25 9:09 ` Ivan Shmakov
2014-11-25 14:50 ` Stefan Monnier
2014-11-25 15:45 ` Ivan Shmakov
2014-11-25 16:51 ` Eli Zaretskii
2014-11-25 18:10 ` Ivan Shmakov [this message]
2014-11-26 2:22 ` Stefan Monnier
2016-04-30 15:22 ` Lars Ingebrigtsen
2014-11-25 17:38 ` Stefan Monnier
2014-11-24 13:12 ` bug#19152: bug#19013: bug#19152: bug#19013: " Eli Zaretskii
2014-11-28 23:15 ` Stefan Monnier
2014-12-02 10:14 ` bug#19152: " Ivan Shmakov
2014-12-02 13:57 ` Stefan Monnier
2016-03-09 11:37 ` Brendan O'Dea
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=87tx1nqhgf.fsf@violet.siamics.net \
--to=ivan@siamics.net \
--cc=19152@debbugs.gnu.org \
/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.