GNU bug report logs - #19152
25.0.50; "You can run the command `debug-on-entry' with M-x deb-o RET"

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Sun, 23 Nov 2014 03:16:02 UTC

Severity: minor

Tags: fixed

Found in version 25.0.50

Fixed in version 26.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 19152 in the body.
You can then email your comments to 19152 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#19152; Package emacs. (Sun, 23 Nov 2014 03:16:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Drew Adams <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 23 Nov 2014 03:16:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.0.50; "You can run the command `debug-on-entry' with M-x deb-o RET"
Date: Sat, 22 Nov 2014 19:14:23 -0800 (PST)
Please remove such silly messages, which do not tell users about a *key
sequence* bound to the command they entered.

(Not to mention that you didn't even put "M-x deb-o RET" between `...'.)

This is not progress.  Noise, not help.  What were you thinking?

In GNU Emacs 25.0.50.1 (i686-pc-mingw32)
 of 2014-10-20 on LEG570
Bzr revision: 118168 rgm <at> gnu.org-20141020195941-icp42t8ttcnud09g
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --enable-checking=yes,glyphs CPPFLAGS=-DGLYPH_DEBUG=1'




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19152; Package emacs. (Sun, 23 Nov 2014 11:17:02 GMT) Full text and rfc822 format available.

Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: dieter <at> duenenhof-wilhelm.de (H. Dieter Wilhelm)
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#19152: 25.0.50;
 "You can run the command `debug-on-entry' with M-x deb-o RET"
Date: Sun, 23 Nov 2014 12:15:53 +0100
Drew Adams <drew.adams <at> oracle.com> writes:

> Please remove such silly messages, which do not tell users about a *key
> sequence* bound to the command they entered.

Actually I find these messages very instructive for people like me,
which had no idea about this (new with Emacs-25?) abbreviation ability!

> (Not to mention that you didn't even put "M-x deb-o RET" between `...'.)

`This could be an unmentioned improvement.' ;-)

> This is not progress.  Noise, not help.  What were you thinking?

In the contrary I appreciate such messages very much because they remind
me to become more efficient.

*But* above hint is not optimal!  It should have
been for example  `M-x d-o- <RET>' and not: M-x deb-o RET!
                       ^^^^^^^^^^

So bug#19152 is for real, since the hints are not yet conforming to key
binding conventions and might return an ambiguous and not optimal
(regarding to speed) key sequence.

Thank you for the key binding hints

        Dieter

-- 
Best wishes
H. Dieter Wilhelm
Darmstadt, Germany





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19152; Package emacs. (Sun, 23 Nov 2014 11:52:02 GMT) Full text and rfc822 format available.

Message #11 received at 19152 <at> debbugs.gnu.org (full text, mbox):

From: Ivan Shmakov <ivan <at> siamics.net>
To: 19013 <at> debbugs.gnu.org,
 19152 <at> debbugs.gnu.org, 19152-submitter <at> debbugs.gnu.org
Subject: Re: bug#19013: 25.0.50; Suggestions for M-x commands 
Date: Sun, 23 Nov 2014 11:50:45 +0000
[Message part 1 (text/plain, inline)]
>>>>> Ivan Shmakov <ivan <at> siamics.net> writes:

	(BTW, what about merging #19013 and #19152?)

[…]

 > 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.)

	Please consider the patch MIMEd.

	* lisp/simple.el
	(suggest-shorter-command-limit): New customizable variable.
	(execute-extended-command--shorter): Respect
	`suggest-shorter-command-limit'.
	(execute-extended-command): Likewise.

-- 
FSF associate member #7257  np. Your Leaving — Jami Sieber   … B6A0 230E 334A
[Message part 2 (text/diff, inline)]
--- a/lisp/simple.el	2014-11-21 09:21:50 +0000
+++ b/lisp/simple.el	2014-11-23 11:34:08 +0000
@@ -1598,6 +1598,13 @@
                  (integer :tag "time" 2)
                  (other :tag "on")))
 
+(defcustom suggest-shorter-command-limit 5
+  "Only suggest the equivalent M-x invocation when shorter by this amount.
+If the value is nil, do not suggest shorter M-x key-bindings at all."
+  :group 'keyboard
+  :type '(choice (const :tag "off" nil)
+                 (integer :tag "characters")))
+
 (defun execute-extended-command--shorter-1 (name length)
   (cond
    ((zerop length) (list ""))
@@ -1623,7 +1630,7 @@ defun execute-extended-command--shorter (name typed)
                                       name len)))
                   ;; Don't show the help message if the binding isn't
                   ;; significantly shorter than the M-x command the user typed.
-                  (< len (- max 5))))
+                  (< len (- max suggest-shorter-command-limit))))
       (let ((candidate (pop candidates)))
         (when (equal name
                        (car-safe (completion-try-completion
@@ -1680,7 +1687,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 suggest-shorter-command-limit)
+                    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.

Message sent on to Drew Adams <drew.adams <at> oracle.com>:
bug#19152. (Sun, 23 Nov 2014 11:52:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19152; Package emacs. (Sun, 23 Nov 2014 15:38:03 GMT) Full text and rfc822 format available.

Message #17 received at 19152 <at> debbugs.gnu.org (full text, mbox):

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: dieter <at> duenenhof-wilhelm.de (H. Dieter Wilhelm)
Cc: 19152 <at> debbugs.gnu.org
Subject: Re: bug#19152: 25.0.50;
 "You can run the command `debug-on-entry' with M-x deb-o RET"
Date: Sun, 23 Nov 2014 16:36:43 +0100
dieter <at> duenenhof-wilhelm.de (H. Dieter Wilhelm) writes:

>> (Not to mention that you didn't even put "M-x deb-o RET" between `...'.)
>
> `This could be an unmentioned improvement.' ;-)
>
>> This is not progress.  Noise, not help.  What were you thinking?
>
> In the contrary I appreciate such messages very much because they remind
> me to become more efficient.
>
> *But* above hint is not optimal!  It should have
> been for example  `M-x d-o- <RET>' and not: M-x deb-o RET!
>                        ^^^^^^^^^^

Whether that's unique or not depends on what you have loaded.
`M-x deb-o' or `M-x d-o-' is not sufficient for me due to me loading
debbugs-gnu and stuff.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19152; Package emacs. (Sun, 23 Nov 2014 15:42:02 GMT) Full text and rfc822 format available.

Message #20 received at 19152 <at> debbugs.gnu.org (full text, mbox):

From: Jay Belanger <jay.p.belanger <at> gmail.com>
To: 19152 <at> debbugs.gnu.org
Cc: jay.p.belanger <at> gmail.com
Subject: Re: bug#19152: 25.0.50;
 "You can run the command `debug-on-entry' with M-x deb-o RET"
Date: Sun, 23 Nov 2014 09:41:10 -0600
dieter <at> duenenhof-wilhelm.de (H. Dieter Wilhelm) writes:
> Drew Adams <drew.adams <at> oracle.com> writes:
>
>> Please remove such silly messages, which do not tell users about a *key
>> sequence* bound to the command they entered.
>
> Actually I find these messages very instructive for people like me,
> which had no idea about this (new with Emacs-25?) abbreviation ability!

Do you use the abbreviations a lot?

The full M-x commands have descriptive names and are always available; the
abbreviations given have neither of these qualities.  Like Drew, I find the
messages to be noise.

Jay




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19152; Package emacs. (Sun, 23 Nov 2014 15:56:02 GMT) Full text and rfc822 format available.

Message #23 received at submit <at> debbugs.gnu.org (full text, mbox):

From: dieter <at> duenenhof-wilhelm.de (H. Dieter Wilhelm)
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#19152: 25.0.50;
 "You can run the command `debug-on-entry' with M-x deb-o RET"
Date: Sun, 23 Nov 2014 16:54:19 +0100
Lars Magne Ingebrigtsen <larsi <at> gnus.org> writes:

> dieter <at> duenenhof-wilhelm.de (H. Dieter Wilhelm) writes:
>
>>> (Not to mention that you didn't even put "M-x deb-o RET" between `...'.)
>>
>> `This could be an unmentioned improvement.' ;-)
>>
>>> This is not progress.  Noise, not help.  What were you thinking?
>>
>> In the contrary I appreciate such messages very much because they remind
>> me to become more efficient.
>>
>> *But* above hint is not optimal!  It should have
>> been for example  `M-x d-o- <RET>' and not: M-x deb-o RET!
>>                        ^^^^^^^^^^
>
> Whether that's unique or not depends on what you have loaded.
> `M-x deb-o' or `M-x d-o-' is not sufficient for me due to me loading
> debbugs-gnu and stuff.

Yes you are right! After debbugs-gnu.. one needs to type `M-x d-on-' as
a shortcut for debugs-on-entry to be unambiguous ;-)

  Dieter
-- 
Best wishes
H. Dieter Wilhelm
Darmstadt, Germany





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19152; Package emacs. (Sun, 23 Nov 2014 16:16:02 GMT) Full text and rfc822 format available.

Message #26 received at submit <at> debbugs.gnu.org (full text, mbox):

From: dieter <at> duenenhof-wilhelm.de (H. Dieter Wilhelm)
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#19152: 25.0.50;
 "You can run the command `debug-on-entry' with M-x deb-o RET"
Date: Sun, 23 Nov 2014 17:14:28 +0100
Hi Jay,

Jay Belanger <jay.p.belanger <at> gmail.com> writes:

> dieter <at> duenenhof-wilhelm.de (H. Dieter Wilhelm) writes:
>> Drew Adams <drew.adams <at> oracle.com> writes:
>>
>>> Please remove such silly messages, which do not tell users about a *key
>>> sequence* bound to the command they entered.
>>
>> Actually I find these messages very instructive for people like me,
>> which had no idea about this (new with Emacs-25?) abbreviation ability!
>
> Do you use the abbreviations a lot?

I used them not yet so often but since I'm using more and more commands
without key-bindings (which is painful when you already know which
command you want) I'm going to use them for

- debug-on-entry (d-on-)
- debbugs-gnu-bugs (d-g-b)
- re-builder (re-b)
- eval-buffer (e-bu)
- log-edit-insert-changelog (l-e-i-c)

> The full M-x commands have descriptive names and are always available;
> the abbreviations given have neither of these qualities.

But the descriptive names remain available, it's just when you know what
you want you are empowered to type it faster, aren't you?  Hmm, I should
have reported that I'm using icomplete-mode, of course, this mode feels
so natural that I'm already took it for granted, sorry!  With (setq
icomplete-mode t) you can see both the full descriptive names and the
abbreviation.

Have a nice day

     Dieter

-- 
Best wishes
H. Dieter Wilhelm
Darmstadt, Germany





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19152; Package emacs. (Sun, 23 Nov 2014 16:17:01 GMT) Full text and rfc822 format available.

Message #29 received at 19152 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: dieter <at> duenenhof-wilhelm.de, 19152 <at> debbugs.gnu.org
Subject: RE: bug#19152: 25.0.50; "You can run the command `debug-on-entry'
 with M-x deb-o RET"
Date: Sun, 23 Nov 2014 08:16:17 -0800 (PST)
> Actually I find these messages very instructive for people like me,
> which had no idea about this (new with Emacs-25?) abbreviation
> ability!

Then turn them for your own use.  And no, it is not new with
Emacs 25.  And even if there were some new completion matching
method, that is not a reason to bother users by drawing their
attention to it for their `M-x' use.  Let people learn normally.

You "had no idea about this".  Fine.  RTFM.  Read NEWS.  Explore
Emacs - there are a thousand ways to learn how to use it.

Some developer's new discovery (even of something that is not
new) might be a shiny new toy to that developer, but that is not
a reason to send up fireworks to advertise its existence.

> > This is not progress.  Noise, not help.  What were you thinking?
> 
> In the contrary I appreciate such messages very much because they
> remind me to become more efficient.

Again, for your own use, please.

> *But* above hint is not optimal!  It should have
> been for example  `M-x d-o- <RET>' and not: M-x deb-o RET!

Not necessarily.  Depends on the current values of
`completion-styles' and `completion-category-overrides'.

Does your messaging take those into account?  Are we going to
be analyzing possible completions for the current command now,
in order to give users a reasonable and context-sensitive such
"help" message?

The right thing is to drop this.  Let users learn about the
standard (and any nonstandard but possibly current) ways that
command names (and other names) can be abbreviated.

There will always be some users (typically newbies, but we are
all newbies for some parts of Emacs) who find such a message
helpful, because they haven't read the doc yet or otherwise
learned about this or that UI feature.

That's not a reason to turn this crap on by default.  Control
it by `novice.el', if you like, or add a user option (off by
default) `for novice-ui-help'.

> So bug#19152 is for real, since the hints are not yet conforming to
> key binding conventions and might return an ambiguous and not optimal
> (regarding to speed) key sequence.

One person's optimal is another person's bother.  There are
many ways to match a name.  Some might be more optimal for some
users in some contexts than others.  But there is nothing gained
by trying to find "the optimal" one ("regarding to speed" or any
other quality).  It is a matter of a user's key bindings, keyboard
layout, personal preferences, etc.

Not to mention that some (especially newbie?) users will take
such a message as an admonition that they are doing something
wrong, and that they should or must mend their ways to do
things the indicated "right way".

YAGNI.  This is not a good idea; sorry.

Please remove it, at at least as default behavior.  A reminder
that a command is bound to a key is a reasonable feature.  And
even for that we have a user option (`suggest-key-bindings').

If you want to add another user option for this noise, I have
no objection, as long as this behavior is off by default.

Just one opinion, of course.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19152; Package emacs. (Sun, 23 Nov 2014 18:55:02 GMT) Full text and rfc822 format available.

Message #32 received at 19152 <at> debbugs.gnu.org (full text, mbox):

From: Alan Mackenzie <acm <at> muc.de>
To: dieter <at> duenenhof-wilhelm.de (H. Dieter Wilhelm)
Cc: 19152 <at> debbugs.gnu.org
Subject: Re: bug#19152: 25.0.50;
 "You can run the command `debug-on-entry' with M-x deb-o RET"
Date: 23 Nov 2014 18:54:41 -0000
In article <mailman.14373.1416741437.1147.bug-gnu-emacs <at> gnu.org> you wrote:
> Drew Adams <drew.adams <at> oracle.com> writes:

>> Please remove such silly messages, which do not tell users about a *key
>> sequence* bound to the command they entered.

+1

> Actually I find these messages very instructive for people like me,
> which had no idea about this (new with Emacs-25?) abbreviation ability!

Which is of questionable value and questionable safety.  Read the anecdote
in entry "DWIM" of the New Hacker's Dictionary (about somebody having his
command "delete *$" helpfully interpreted as "delete *") to see why.

This feature is even present in Emacs 24.3.  I'm now going to find out how
to turn it off, once and for all.

>        Dieter

> -- 
> Best wishes
> H. Dieter Wilhelm
> Darmstadt, Germany

-- 
Alan Mackenzie (Nuremberg, Germany).





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19152; Package emacs. (Sun, 23 Nov 2014 19:00:02 GMT) Full text and rfc822 format available.

Message #35 received at 19152 <at> debbugs.gnu.org (full text, mbox):

From: Ivan Shmakov <ivan <at> siamics.net>
To: 19152 <at> debbugs.gnu.org
Subject: Re: bug#19152: 25.0.50;
 "You can run the command `debug-on-entry' with M-x deb-o RET" 
Date: Sun, 23 Nov 2014 18:59:36 +0000
>>>>> Alan Mackenzie <acm <at> muc.de> writes:

[…]

 >> Actually I find these messages very instructive for people like me,
 >> which had no idea about this (new with Emacs-25?) abbreviation
 >> ability!

 > Which is of questionable value and questionable safety.  Read the
 > anecdote in entry "DWIM" of the New Hacker's Dictionary (about
 > somebody having his command "delete *$" helpfully interpreted as
 > "delete *") to see why.

	Do you have any specific scenario in mind where this
	‘-’-completion may be harmful?  I’m occasionally using it for I
	guess around a year or so and never had an issue.

 > This feature is even present in Emacs 24.3.  I'm now going to find
 > out how to turn it off, once and for all.

-- 
FSF associate member #7257  http://boycottsystemd.org/  … 3013 B6A0 230E 334A




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19152; Package emacs. (Mon, 24 Nov 2014 04:12:02 GMT) Full text and rfc822 format available.

Message #38 received at 19152 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Ivan Shmakov <ivan <at> siamics.net>
Cc: 19152-submitter <at> debbugs.gnu.org, 19013 <at> debbugs.gnu.org,
 19152 <at> debbugs.gnu.org
Subject: Re: bug#19152: bug#19013: 25.0.50; Suggestions for M-x commands
Date: Sun, 23 Nov 2014 23:11:22 -0500
>> 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.

Sounds like a plain bug.

>> 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.)

I don't think that's needed.


        Stefan




Message sent on to Drew Adams <drew.adams <at> oracle.com>:
bug#19152. (Mon, 24 Nov 2014 04:12:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19152; Package emacs. (Mon, 24 Nov 2014 07:03:02 GMT) Full text and rfc822 format available.

Message #44 received at 19152 <at> debbugs.gnu.org (full text, mbox):

From: Ivan Shmakov <ivan <at> siamics.net>
To: 19013 <at> debbugs.gnu.org, 19152 <at> debbugs.gnu.org
Subject: Re: bug#19152: 25.0.50; Suggestions for M-x commands 
Date: Mon, 24 Nov 2014 07:01:56 +0000
>>>>> Stefan Monnier <monnier <at> IRO.UMontreal.CA> writes:

 >> 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.

 > Sounds like a plain bug.

	One more reason for the new features to provide a way for the
	user to opt out, – just in case they turn to be buggy.

	Frankly, I do not consider this feature helpful, and have no
	intent on fixing this particular issue in its implementation.

	If anything, I’d just live with the workaround I’ve provided
	earlier [1].

[1] http://debbugs.gnu.org/19013#msg30

 >> 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.)

 > I don't think that's needed.

	The mere fact that bug#19152 was filed suggests otherwise.

-- 
FSF associate member #7257  http://boycottsystemd.org/  … 3013 B6A0 230E 334A




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19152; Package emacs. (Mon, 24 Nov 2014 13:13:02 GMT) Full text and rfc822 format available.

Message #47 received at 19152 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: 19152 <at> debbugs.gnu.org, ivan <at> siamics.net
Subject: Re: bug#19013: bug#19152: bug#19013: 25.0.50;
 Suggestions for M-x commands
Date: Mon, 24 Nov 2014 15:12:14 +0200
> From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
> Date: Sun, 23 Nov 2014 23:11:22 -0500
> Cc: 19152-submitter <at> debbugs.gnu.org, 19013 <at> debbugs.gnu.org,
> 	19152 <at> debbugs.gnu.org
> 
> >> 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.)
> 
> I don't think that's needed.

I disagree.  This is new behavior different from previous one, and
it's clearly at least a little bit controversial.  So I think we
should have an option to turn it off and get back the old behavior.
Something like what Ivan proposed, with minor changes, would be good,
IMO.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19152; Package emacs. (Mon, 24 Nov 2014 14:58:01 GMT) Full text and rfc822 format available.

Message #50 received at 19152 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: 19152 <at> debbugs.gnu.org
Subject: Re: bug#19013: bug#19152: 25.0.50; Suggestions for M-x commands
Date: Mon, 24 Nov 2014 09:57:11 -0500
> 	One more reason for the new features to provide a way for the
> 	user to opt out, – just in case they turn to be buggy.

Options to circumvent bugs are a bad idea, in general (with exceptions,
of course, like everything, such as when the bug is particularly hard to
fix, or occurs in some code we can't control).

>>> 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.)
>> I don't think that's needed.
> 	The mere fact that bug#19152 was filed suggests otherwise.

An option to turn the feature off is fine.  An option to choose the
number of chars we have to gain is not.


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19152; Package emacs. (Tue, 25 Nov 2014 09:11:03 GMT) Full text and rfc822 format available.

Message #53 received at 19152 <at> debbugs.gnu.org (full text, mbox):

From: Ivan Shmakov <ivan <at> siamics.net>
To: 19152 <at> debbugs.gnu.org
Subject: Re: bug#19152: 25.0.50; Suggestions for M-x commands 
Date: Tue, 25 Nov 2014 09:09:33 +0000
>>>>> Stefan Monnier <monnier <at> IRO.UMontreal.CA> writes:

 >> One more reason for the new features to provide a way for the user
 >> to opt out, – just in case they turn to be buggy.

 > Options to circumvent bugs are a bad idea, in general (with
 > exceptions, of course, like everything, such as when the bug is
 > particularly hard to fix, or occurs in some code we can't control).

	Analogously speaking, isn’t --without-x-toolkit just an option
	to circumvent Gtk-related bugs?

 >>>> 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.)

 >>> I don't think that's needed.

 >> The mere fact that bug#19152 was filed suggests otherwise.

 > 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?

	Diff-wise, the difference is two lines only: one in defcustom,
	to allow for an integer value for the option; the other in
	execute-extended-command--shorter, to replace the currently
	magic 5.

	That said, I’m fine with doing it either way.

-- 
FSF associate member #7257  http://boycottsystemd.org/  … 3013 B6A0 230E 334A




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19152; Package emacs. (Tue, 25 Nov 2014 14:51:02 GMT) Full text and rfc822 format available.

Message #56 received at 19152 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: 19152 <at> debbugs.gnu.org
Subject: Re: bug#19152: 25.0.50; Suggestions for M-x commands
Date: Tue, 25 Nov 2014 09:50:25 -0500
>> Options to circumvent bugs are a bad idea, in general (with
>> exceptions, of course, like everything, such as when the bug is
>> particularly hard to fix, or occurs in some code we can't control).
> 	Analogously speaking, isn’t --without-x-toolkit just an option
> 	to circumvent Gtk-related bugs?

If it is, then it's OK because those bugs "occur in some code we can't control".

>> 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.

BTW, if you want to "turn it off" and can't wait for someone to install
such an option in the trunk, you can try:

   (advice-add 'execute-extended-command--shorter :override #'ignore)


-- Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19152; Package emacs. (Tue, 25 Nov 2014 15:46:01 GMT) Full text and rfc822 format available.

Message #59 received at 19152 <at> debbugs.gnu.org (full text, mbox):

From: Ivan Shmakov <ivan <at> siamics.net>
To: 19152 <at> debbugs.gnu.org
Subject: Re: bug#19152: 25.0.50; Suggestions for M-x commands 
Date: Tue, 25 Nov 2014 15:45:18 +0000
>>>>> Stefan Monnier <monnier <at> 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.

 > BTW, if you want to "turn it off" and can't wait for someone to
 > install such an option in the trunk, you can try:

 >    (advice-add 'execute-extended-command--shorter :override #'ignore)

	Well, to quote myself [2]:

 > If anything, I’d just live with the workaround I’ve provided earlier
 > [1].

 > [1] http://debbugs.gnu.org/19013#msg30
   [2] news:87vbm5rsij.fsf_-_ <at> violet.siamics.net

-- 
FSF associate member #7257  http://boycottsystemd.org/  … 3013 B6A0 230E 334A




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19152; Package emacs. (Tue, 25 Nov 2014 16:52:02 GMT) Full text and rfc822 format available.

Message #62 received at 19152 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ivan Shmakov <ivan <at> siamics.net>
Cc: 19152 <at> debbugs.gnu.org
Subject: Re: bug#19152: 25.0.50; Suggestions for M-x commands
Date: Tue, 25 Nov 2014 18:51:32 +0200
> From: Ivan Shmakov <ivan <at> siamics.net>
> Date: Tue, 25 Nov 2014 15:45:18 +0000
> 
> >>>>> Stefan Monnier <monnier <at> 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, and call it some name
that begins with extended-command?  I think there's a consensus that
such an option is OK.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19152; Package emacs. (Tue, 25 Nov 2014 17:39:03 GMT) Full text and rfc822 format available.

Message #65 received at 19152 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: 19152 <at> debbugs.gnu.org
Subject: Re: bug#19152: 25.0.50; Suggestions for M-x commands
Date: Tue, 25 Nov 2014 12:38:42 -0500
> 	I see no big difference between suggest-key-bindings’ seconds
> 	and the suggested suggest-shorter-command-limit’s characters.

I don't either, except that one exists already, so it's more trouble to
remove it.


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19152; Package emacs. (Tue, 25 Nov 2014 18:11:01 GMT) Full text and rfc822 format available.

Message #68 received at 19152 <at> debbugs.gnu.org (full text, mbox):

From: Ivan Shmakov <ivan <at> siamics.net>
To: 19152 <at> debbugs.gnu.org
Subject: Re: bug#19152: 25.0.50; Suggestions for M-x commands 
Date: Tue, 25 Nov 2014 18:10:40 +0000
[Message part 1 (text/plain, inline)]
>>>>> Eli Zaretskii <eliz <at> gnu.org> writes:
>>>>> From: Ivan Shmakov  Date: Tue, 25 Nov 2014 15:45:18 +0000
>>>>> Stefan Monnier <monnier <at> 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
[Message part 2 (text/diff, inline)]
--- 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.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19152; Package emacs. (Wed, 26 Nov 2014 02:23:02 GMT) Full text and rfc822 format available.

Message #71 received at 19152 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: 19152 <at> debbugs.gnu.org
Subject: Re: bug#19152: 25.0.50; Suggestions for M-x commands
Date: Tue, 25 Nov 2014 21:22:08 -0500
> 	… Please consider the patch MIMEd.

Looks fine, feel free to install it,


        Stefan




Reply sent to Stefan Monnier <monnier <at> IRO.UMontreal.CA>:
You have taken responsibility. (Fri, 28 Nov 2014 23:16:02 GMT) Full text and rfc822 format available.

Notification sent to Drew Adams <drew.adams <at> oracle.com>:
bug acknowledged by developer. (Fri, 28 Nov 2014 23:16:02 GMT) Full text and rfc822 format available.

Message #76 received at 19152-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Ivan Shmakov <ivan <at> siamics.net>
Cc: 19152-done <at> debbugs.gnu.org
Subject: Re: bug#19152: bug#19013: 25.0.50; Suggestions for M-x commands
Date: Fri, 28 Nov 2014 18:15:13 -0500
>>> 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.

> Sounds like a plain bug.

Should be fixed now,


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19152; Package emacs. (Tue, 02 Dec 2014 10:15:02 GMT) Full text and rfc822 format available.

Message #79 received at 19152 <at> debbugs.gnu.org (full text, mbox):

From: Ivan Shmakov <ivan <at> siamics.net>
To: 19152 <at> debbugs.gnu.org
Subject: Re: bug#19152: 25.0.50; Suggestions for M-x commands 
Date: Tue, 02 Dec 2014 10:14:14 +0000
>>>>> "SM" == Stefan Monnier <monnier <at> IRO.UMontreal.CA> writes:
>>>>> "IS" == Ivan Shmakov <ivan <at> siamics.net> writes:
>>>>> "DA" == Drew Adams <drew.adams <at> oracle.com> writes:

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

 SM> Sounds like a plain bug.

 SM> Should be fixed now,

	Well, ac4532a23265 (2014-11-28 23:14:38Z) indeed fixes the issue
	above, but not quite #19152 as initially reported (below), which
	still needs something like the change I’ve previously suggested
	[1].

 DA> Please remove such silly messages, which do not tell users about a
 DA> *key sequence* bound to the command they entered.

	My apologies for contributing to the confusion.

[1] http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19152#msg68
    news:87tx1nqhgf.fsf <at> violet.siamics.net

-- 
FSF associate member #7257  http://boycottsystemd.org/  … 3013 B6A0 230E 334A




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19152; Package emacs. (Tue, 02 Dec 2014 13:58:03 GMT) Full text and rfc822 format available.

Message #82 received at 19152 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: 19152 <at> debbugs.gnu.org
Subject: Re: bug#19152: 25.0.50; Suggestions for M-x commands
Date: Tue, 02 Dec 2014 08:57:55 -0500
> 	Well, ac4532a23265 (2014-11-28 23:14:38Z) indeed fixes the issue
> 	above, but not quite #19152 as initially reported (below), which
> 	still needs something like the change I’ve previously suggested
> 	[1].

Indeed, this patch hasn't been installed yet.  Could someone take care
of it?


        Stefan




Did not alter fixed versions and reopened. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 26 Dec 2014 17:51:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19152; Package emacs. (Wed, 09 Mar 2016 16:27:02 GMT) Full text and rfc822 format available.

Message #87 received at 19152 <at> debbugs.gnu.org (full text, mbox):

From: Brendan O'Dea <bod <at> c47.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 19152 <at> debbugs.gnu.org
Subject: Re: bug#19152: 25.0.50; Suggestions for M-x commands
Date: Wed, 9 Mar 2016 22:37:04 +1100
On Tue, Dec 02, 2014 at 08:57:55AM -0500, Stefan Monnier wrote:
>> 	Well, ac4532a23265 (2014-11-28 23:14:38Z) indeed fixes the issue
>> 	above, but not quite #19152 as initially reported (below), which
>> 	still needs something like the change I’ve previously suggested
>> 	[1].
>
>Indeed, this patch hasn't been installed yet.  Could someone take care
>of it?

The suggested change[1] still doesn't appear to have been applied.  I can
advise the function out of existance as per [2], but a configuration option
would ssem to be preferable.  What needs to be done to get that patch applied?

[1] http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19152#68
[2] http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19152#56

--bod




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19152; Package emacs. (Sat, 30 Apr 2016 15:23:02 GMT) Full text and rfc822 format available.

Message #90 received at 19152 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 19152 <at> debbugs.gnu.org, Ivan Shmakov <ivan <at> siamics.net>
Subject: Re: bug#19152: 25.0.50; Suggestions for M-x commands
Date: Sat, 30 Apr 2016 17:22:50 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Ivan Shmakov <ivan <at> siamics.net>
>> Date: Tue, 25 Nov 2014 15:45:18 +0000
>> 
>> >>>>> Stefan Monnier <monnier <at> 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, and call it some name
> that begins with extended-command?  I think there's a consensus that
> such an option is OK.

This wasn't installed?  I'll install it with some documentation.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 30 Apr 2016 15:32:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 25.2, send any further explanations to 19152 <at> debbugs.gnu.org and Drew Adams <drew.adams <at> oracle.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 30 Apr 2016 15:32:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 29 May 2016 11:24:09 GMT) Full text and rfc822 format available.

bug unarchived. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Sun, 04 Dec 2016 02:50:06 GMT) Full text and rfc822 format available.

bug Marked as fixed in versions 26.1. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Sun, 04 Dec 2016 02:50:06 GMT) Full text and rfc822 format available.

bug No longer marked as fixed in versions 25.2. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Sun, 04 Dec 2016 02:50:06 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 01 Jan 2017 12:24:17 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 225 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.