unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#7967: 23.2.93; keybindings should be echoed in *Message* buffer
@ 2011-02-02 18:09 Roland Winkler
  2011-02-02 23:15 ` Lennart Borgman
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Roland Winkler @ 2011-02-02 18:09 UTC (permalink / raw)
  To: 7967

Execute any command foo with a keybinding in its "long form" M-x foo.
Emacs issues the message 

  You can run the command `foo' with ...

The default is to display this message for two seconds.
Then the message is gone for ever.  I'd appreciate if this
messsage was echoed also in the *Message* buffer.


In GNU Emacs 23.2.93.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.20.1)
 of 2011-02-02 on regnitz
Windowing system distributor `The X.Org Foundation', version 11.0.10706000





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

* bug#7967: 23.2.93; keybindings should be echoed in *Message* buffer
  2011-02-02 18:09 bug#7967: 23.2.93; keybindings should be echoed in *Message* buffer Roland Winkler
@ 2011-02-02 23:15 ` Lennart Borgman
  2011-02-02 23:25   ` Roland Winkler
  2011-02-02 23:58   ` Deniz Dogan
  2011-02-03  0:41 ` Glenn Morris
  2011-03-11  4:49 ` Zachary Kanfer
  2 siblings, 2 replies; 15+ messages in thread
From: Lennart Borgman @ 2011-02-02 23:15 UTC (permalink / raw)
  To: Roland Winkler; +Cc: 7967

On Wed, Feb 2, 2011 at 7:09 PM, Roland Winkler <winkler@gnu.org> wrote:
> Execute any command foo with a keybinding in its "long form" M-x foo.
> Emacs issues the message
>
>  You can run the command `foo' with ...
>
> The default is to display this message for two seconds.
> Then the message is gone for ever.  I'd appreciate if this
> messsage was echoed also in the *Message* buffer.

I think it is a good suggestion.

However while it can help newbies it might also disturb old users so
it is probably best to make it default and have an option to turn it
off.





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

* bug#7967: 23.2.93; keybindings should be echoed in *Message* buffer
  2011-02-02 23:15 ` Lennart Borgman
@ 2011-02-02 23:25   ` Roland Winkler
  2011-02-02 23:48     ` Lennart Borgman
  2011-02-02 23:58   ` Deniz Dogan
  1 sibling, 1 reply; 15+ messages in thread
From: Roland Winkler @ 2011-02-02 23:25 UTC (permalink / raw)
  To: Lennart Borgman; +Cc: 7967

On Thu Feb 3 2011 Lennart Borgman wrote:
> On Wed, Feb 2, 2011 at 7:09 PM, Roland Winkler <winkler@gnu.org> wrote:
> > Execute any command foo with a keybinding in its "long form" M-x foo.
> > Emacs issues the message
> >
> >  You can run the command `foo' with ...
> >
> > The default is to display this message for two seconds.
> > Then the message is gone for ever.  I'd appreciate if this
> > messsage was echoed also in the *Message* buffer.
> 
> I think it is a good suggestion.
> 
> However while it can help newbies it might also disturb old users so
> it is probably best to make it default and have an option to turn it
> off.

The experienced user can already switch off these messages
completely by means of the variable

suggest-key-bindings

So all I am suggesting is really: if the keybindings are given in
the message area (because suggest-key-bindings is non-nil), then
these messages should also be recorded in the *Messages* buffer.
All this is handled by the built-in function execute-extended-command,
which is why this problem goes beyond my lisp hacking skills.

Roland





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

* bug#7967: 23.2.93; keybindings should be echoed in *Message* buffer
  2011-02-02 23:25   ` Roland Winkler
@ 2011-02-02 23:48     ` Lennart Borgman
  2011-02-03  0:05       ` Roland Winkler
  0 siblings, 1 reply; 15+ messages in thread
From: Lennart Borgman @ 2011-02-02 23:48 UTC (permalink / raw)
  To: Roland Winkler; +Cc: 7967

On Thu, Feb 3, 2011 at 12:25 AM, Roland Winkler <winkler@gnu.org> wrote:
> On Thu Feb 3 2011 Lennart Borgman wrote:
>> On Wed, Feb 2, 2011 at 7:09 PM, Roland Winkler <winkler@gnu.org> wrote:
>> > Execute any command foo with a keybinding in its "long form" M-x foo.
>> > Emacs issues the message
>> >
>> >  You can run the command `foo' with ...
>> >
>> > The default is to display this message for two seconds.
>> > Then the message is gone for ever.  I'd appreciate if this
>> > messsage was echoed also in the *Message* buffer.
>>
>> I think it is a good suggestion.
>>
>> However while it can help newbies it might also disturb old users so
>> it is probably best to make it default and have an option to turn it
>> off.
>
> The experienced user can already switch off these messages
> completely by means of the variable
>
> suggest-key-bindings
>
> So all I am suggesting is really: if the keybindings are given in
> the message area (because suggest-key-bindings is non-nil), then
> these messages should also be recorded in the *Messages* buffer.
> All this is handled by the built-in function execute-extended-command,
> which is why this problem goes beyond my lisp hacking skills.

Maybe it would still be good with a separate option for recording the
suggestions in the *Messages* buffer?

I am not sure. To implement your suggestion all that is needed is to
replace message2_nolog with message2 in Fexecute_extended_command in
keyboard.c.





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

* bug#7967: 23.2.93; keybindings should be echoed in *Message* buffer
  2011-02-02 23:15 ` Lennart Borgman
  2011-02-02 23:25   ` Roland Winkler
@ 2011-02-02 23:58   ` Deniz Dogan
  1 sibling, 0 replies; 15+ messages in thread
From: Deniz Dogan @ 2011-02-02 23:58 UTC (permalink / raw)
  To: Lennart Borgman; +Cc: Roland Winkler, 7967

2011/2/3 Lennart Borgman <lennart.borgman@gmail.com>:
> On Wed, Feb 2, 2011 at 7:09 PM, Roland Winkler <winkler@gnu.org> wrote:
>> Execute any command foo with a keybinding in its "long form" M-x foo.
>> Emacs issues the message
>>
>>  You can run the command `foo' with ...
>>
>> The default is to display this message for two seconds.
>> Then the message is gone for ever.  I'd appreciate if this
>> messsage was echoed also in the *Message* buffer.
>
> I think it is a good suggestion.
>
> However while it can help newbies it might also disturb old users so
> it is probably best to make it default and have an option to turn it
> off.
>

This is such a minor change I'd doubt that many old users would even
notice it, let alone be annoyed by it.





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

* bug#7967: 23.2.93; keybindings should be echoed in *Message* buffer
  2011-02-02 23:48     ` Lennart Borgman
@ 2011-02-03  0:05       ` Roland Winkler
  0 siblings, 0 replies; 15+ messages in thread
From: Roland Winkler @ 2011-02-03  0:05 UTC (permalink / raw)
  To: Lennart Borgman; +Cc: 7967

On Thu Feb 3 2011 Lennart Borgman wrote:
> Maybe it would still be good with a separate option for recording the
> suggestions in the *Messages* buffer?
> 
> I am not sure. To implement your suggestion all that is needed is to
> replace message2_nolog with message2 in Fexecute_extended_command in
> keyboard.c.

I am not aware that other emacs functions that issue messages
allowed one to configure separately whether the message appears in
the message area, and whether it will be recorded in the *Message*
buffer. Probably, this was discussed long time ago when the concept
of having the *Message* buffer was first introduced (and
execute-extended-command should follow here "the usual rules").

I thought that the possiblity to have messages that are not recorded
in the *Messages* buffer was mostly intended for things like
reporting operation progress, where it is rather unlikely one wants
to look back at individual messages.

But maybe I am overlooking something here.

Roland





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

* bug#7967: 23.2.93; keybindings should be echoed in *Message* buffer
  2011-02-02 18:09 bug#7967: 23.2.93; keybindings should be echoed in *Message* buffer Roland Winkler
  2011-02-02 23:15 ` Lennart Borgman
@ 2011-02-03  0:41 ` Glenn Morris
  2011-02-03  1:47   ` Roland Winkler
  2011-02-06 17:16   ` Roland Winkler
  2011-03-11  4:49 ` Zachary Kanfer
  2 siblings, 2 replies; 15+ messages in thread
From: Glenn Morris @ 2011-02-03  0:41 UTC (permalink / raw)
  To: Roland Winkler; +Cc: 7967

"Roland Winkler" wrote:

> Execute any command foo with a keybinding in its "long form" M-x foo.
> Emacs issues the message 
>
>   You can run the command `foo' with ...
>
> The default is to display this message for two seconds.
> Then the message is gone for ever. 

You can use M-x where-is (C-h w) to bring it back whenever you like.





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

* bug#7967: 23.2.93; keybindings should be echoed in *Message* buffer
  2011-02-03  0:41 ` Glenn Morris
@ 2011-02-03  1:47   ` Roland Winkler
  2011-02-03  2:18     ` Lennart Borgman
  2011-02-06 17:16   ` Roland Winkler
  1 sibling, 1 reply; 15+ messages in thread
From: Roland Winkler @ 2011-02-03  1:47 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 7967

On Wed Feb 2 2011 Glenn Morris wrote:
> > Execute any command foo with a keybinding in its "long form" M-x foo.
> > Emacs issues the message 
> >
> >   You can run the command `foo' with ...
> >
> > The default is to display this message for two seconds.
> > Then the message is gone for ever. 
> 
> You can use M-x where-is (C-h w) to bring it back whenever you like.

It wasn't emacs if there were not all kind of alternative ways for
this.  But why not put it into the *Message* buffer, too?
I like these messages because my capacity for memorizing things is
limited.

Roland





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

* bug#7967: 23.2.93; keybindings should be echoed in *Message* buffer
  2011-02-03  1:47   ` Roland Winkler
@ 2011-02-03  2:18     ` Lennart Borgman
  0 siblings, 0 replies; 15+ messages in thread
From: Lennart Borgman @ 2011-02-03  2:18 UTC (permalink / raw)
  To: Roland Winkler; +Cc: 7967

On Thu, Feb 3, 2011 at 2:47 AM, Roland Winkler <winkler@gnu.org> wrote:
> On Wed Feb 2 2011 Glenn Morris wrote:
>> > Execute any command foo with a keybinding in its "long form" M-x foo.
>> > Emacs issues the message
>> >
>> >   You can run the command `foo' with ...
>> >
>> > The default is to display this message for two seconds.
>> > Then the message is gone for ever.
>>
>> You can use M-x where-is (C-h w) to bring it back whenever you like.
>
> It wasn't emacs if there were not all kind of alternative ways for
> this.  But why not put it into the *Message* buffer, too?
> I like these messages because my capacity for memorizing things is
> limited.

A very simple alternative for implementing this (without adding a new
option) is to allow negative numbers for suggest-key-bindings. If the
numbers are negative that would then mean that the message would be
stored in *Messages*.

Implementing it this way would be 2 or 3 lines of C code and a new
sentence in the doc string.





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

* bug#7967: 23.2.93; keybindings should be echoed in *Message* buffer
  2011-02-03  0:41 ` Glenn Morris
  2011-02-03  1:47   ` Roland Winkler
@ 2011-02-06 17:16   ` Roland Winkler
  2011-02-07 15:27     ` Stefan Monnier
  2011-02-09  2:52     ` Kevin Rodgers
  1 sibling, 2 replies; 15+ messages in thread
From: Roland Winkler @ 2011-02-06 17:16 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 7967

On Wed Feb 2 2011 Glenn Morris wrote:
> > Execute any command foo with a keybinding in its "long form" M-x foo.
> > Emacs issues the message 
> >
> >   You can run the command `foo' with ...
> >
> > The default is to display this message for two seconds.
> > Then the message is gone for ever. 
> 
> You can use M-x where-is (C-h w) to bring it back whenever you like.

I guess the real-world problem is:

Usually, I am running not just one command, but I am really in the
middle of some larger task when all this happens. And I do not want
to interrupt things because of such a message popping up.

Later on, when I might be able to go back, it's too late. I might
not even remember anymore the command I was executing when this
message popped up.

So is anybody able to fix this? -- Thanks a lot!

Roland





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

* bug#7967: 23.2.93; keybindings should be echoed in *Message* buffer
  2011-02-06 17:16   ` Roland Winkler
@ 2011-02-07 15:27     ` Stefan Monnier
  2011-02-09  2:52     ` Kevin Rodgers
  1 sibling, 0 replies; 15+ messages in thread
From: Stefan Monnier @ 2011-02-07 15:27 UTC (permalink / raw)
  To: Roland Winkler; +Cc: 7967

> So is anybody able to fix this? -- Thanks a lot!

I'm fine with recording those messages in *Messages*, so feel free to
install the corresponding patch.


        Stefan






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

* bug#7967: 23.2.93; keybindings should be echoed in *Message* buffer
  2011-02-06 17:16   ` Roland Winkler
  2011-02-07 15:27     ` Stefan Monnier
@ 2011-02-09  2:52     ` Kevin Rodgers
  1 sibling, 0 replies; 15+ messages in thread
From: Kevin Rodgers @ 2011-02-09  2:52 UTC (permalink / raw)
  To: bug-gnu-emacs

On 2/6/11 10:16 AM, Roland Winkler wrote:
> On Wed Feb 2 2011 Glenn Morris wrote:
>>> Execute any command foo with a keybinding in its "long form" M-x foo.
>>> Emacs issues the message
>>>
>>>    You can run the command `foo' with ...
>>>
>>> The default is to display this message for two seconds.
>>> Then the message is gone for ever.
>>
>> You can use M-x where-is (C-h w) to bring it back whenever you like.
>
> I guess the real-world problem is:
>
> Usually, I am running not just one command, but I am really in the
> middle of some larger task when all this happens. And I do not want
> to interrupt things because of such a message popping up.
>
> Later on, when I might be able to go back, it's too late. I might
> not even remember anymore the command I was executing when this
> message popped up.
>
> So is anybody able to fix this? -- Thanks a lot!

sed -i~ '10656s/message2_nolog/message2/' emacs-23.2/src/keyboard.c
make
make install

-- 
Kevin Rodgers
Denver, Colorado, USA






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

* bug#7967: 23.2.93; keybindings should be echoed in *Message* buffer
  2011-02-02 18:09 bug#7967: 23.2.93; keybindings should be echoed in *Message* buffer Roland Winkler
  2011-02-02 23:15 ` Lennart Borgman
  2011-02-03  0:41 ` Glenn Morris
@ 2011-03-11  4:49 ` Zachary Kanfer
  2011-03-11  5:41   ` Zachary Kanfer
  2 siblings, 1 reply; 15+ messages in thread
From: Zachary Kanfer @ 2011-03-11  4:49 UTC (permalink / raw)
  To: 7967


[-- Attachment #1.1: Type: text/plain, Size: 74 bytes --]

Attached is a patch which implements this functionality.
 -Zachary Kanfer

[-- Attachment #1.2: Type: text/html, Size: 82 bytes --]

[-- Attachment #2: 7967-20110310.txt --]
[-- Type: text/plain, Size: 768 bytes --]

=== modified file 'src/keyboard.c'
*** src/keyboard.c	2011-02-16 16:35:16 +0000
--- src/keyboard.c	2011-03-10 02:40:41 +0000
*************** give to the command you invoke, if it as
*** 10302,10308 ****
  	  sprintf (newmessage, "You can run the command `%s' with %s",
  		   SDATA (SYMBOL_NAME (function)),
  		   SDATA (binding));
! 	  message2_nolog (newmessage,
  			  strlen (newmessage),
  			  STRING_MULTIBYTE (binding));
  	  if (NUMBERP (Vsuggest_key_bindings))
--- 10302,10309 ----
  	  sprintf (newmessage, "You can run the command `%s' with %s",
  		   SDATA (SYMBOL_NAME (function)),
  		   SDATA (binding));
! 	  //zck
! 	  message2 (newmessage,
  			  strlen (newmessage),
  			  STRING_MULTIBYTE (binding));
  	  if (NUMBERP (Vsuggest_key_bindings))


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

* bug#7967: 23.2.93; keybindings should be echoed in *Message* buffer
  2011-03-11  4:49 ` Zachary Kanfer
@ 2011-03-11  5:41   ` Zachary Kanfer
  2011-03-30 13:37     ` Stefan Monnier
  0 siblings, 1 reply; 15+ messages in thread
From: Zachary Kanfer @ 2011-03-11  5:41 UTC (permalink / raw)
  To: 7967


[-- Attachment #1.1: Type: text/plain, Size: 263 bytes --]

My mistake--forgot to clean out a comment in the last patch. Attached is a
fixed one, properly indented.

On Thu, Mar 10, 2011 at 11:49 PM, Zachary Kanfer <zkanfer@gmail.com> wrote:

> Attached is a patch which implements this functionality.
>  -Zachary Kanfer
>

[-- Attachment #1.2: Type: text/html, Size: 557 bytes --]

[-- Attachment #2: 7967-20110310-2.txt --]
[-- Type: text/plain, Size: 889 bytes --]

=== modified file 'src/keyboard.c'
*** src/keyboard.c	2011-02-16 16:35:16 +0000
--- src/keyboard.c	2011-03-11 05:41:00 +0000
*************** give to the command you invoke, if it as
*** 10302,10310 ****
  	  sprintf (newmessage, "You can run the command `%s' with %s",
  		   SDATA (SYMBOL_NAME (function)),
  		   SDATA (binding));
! 	  message2_nolog (newmessage,
! 			  strlen (newmessage),
! 			  STRING_MULTIBYTE (binding));
  	  if (NUMBERP (Vsuggest_key_bindings))
  	    waited = sit_for (Vsuggest_key_bindings, 0, 2);
  	  else
--- 10302,10310 ----
  	  sprintf (newmessage, "You can run the command `%s' with %s",
  		   SDATA (SYMBOL_NAME (function)),
  		   SDATA (binding));
! 	  message2 (newmessage,
! 		    strlen (newmessage),
! 		    STRING_MULTIBYTE (binding));
  	  if (NUMBERP (Vsuggest_key_bindings))
  	    waited = sit_for (Vsuggest_key_bindings, 0, 2);
  	  else


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

* bug#7967: 23.2.93; keybindings should be echoed in *Message* buffer
  2011-03-11  5:41   ` Zachary Kanfer
@ 2011-03-30 13:37     ` Stefan Monnier
  0 siblings, 0 replies; 15+ messages in thread
From: Stefan Monnier @ 2011-03-30 13:37 UTC (permalink / raw)
  To: Zachary Kanfer; +Cc: 7967-done

Version: 24.1

> My mistake--forgot to clean out a comment in the last patch. Attached is a
> fixed one, properly indented.

Thank you, installed,


        Stefan


> On Thu, Mar 10, 2011 at 11:49 PM, Zachary Kanfer <zkanfer@gmail.com> wrote:

>> Attached is a patch which implements this functionality.
>> -Zachary Kanfer
>> 
> === modified file 'src/keyboard.c'
> *** src/keyboard.c	2011-02-16 16:35:16 +0000
> --- src/keyboard.c	2011-03-11 05:41:00 +0000
> *************** give to the command you invoke, if it as
> *** 10302,10310 ****
>   	  sprintf (newmessage, "You can run the command `%s' with %s",
>   		   SDATA (SYMBOL_NAME (function)),
>   		   SDATA (binding));
> ! 	  message2_nolog (newmessage,
> ! 			  strlen (newmessage),
> ! 			  STRING_MULTIBYTE (binding));
>   	  if (NUMBERP (Vsuggest_key_bindings))
>   	    waited = sit_for (Vsuggest_key_bindings, 0, 2);
>   	  else
> --- 10302,10310 ----
>   	  sprintf (newmessage, "You can run the command `%s' with %s",
>   		   SDATA (SYMBOL_NAME (function)),
>   		   SDATA (binding));
> ! 	  message2 (newmessage,
> ! 		    strlen (newmessage),
> ! 		    STRING_MULTIBYTE (binding));
>   	  if (NUMBERP (Vsuggest_key_bindings))
>   	    waited = sit_for (Vsuggest_key_bindings, 0, 2);
>   	  else







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

end of thread, other threads:[~2011-03-30 13:37 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-02 18:09 bug#7967: 23.2.93; keybindings should be echoed in *Message* buffer Roland Winkler
2011-02-02 23:15 ` Lennart Borgman
2011-02-02 23:25   ` Roland Winkler
2011-02-02 23:48     ` Lennart Borgman
2011-02-03  0:05       ` Roland Winkler
2011-02-02 23:58   ` Deniz Dogan
2011-02-03  0:41 ` Glenn Morris
2011-02-03  1:47   ` Roland Winkler
2011-02-03  2:18     ` Lennart Borgman
2011-02-06 17:16   ` Roland Winkler
2011-02-07 15:27     ` Stefan Monnier
2011-02-09  2:52     ` Kevin Rodgers
2011-03-11  4:49 ` Zachary Kanfer
2011-03-11  5:41   ` Zachary Kanfer
2011-03-30 13:37     ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).