GNU bug report logs -
#355
M-x should prompt with function under cursor as default
Previous Next
Reported by: jidanni <at> jidanni.org
Date: Tue, 3 Jun 2008 23:00:02 UTC
Severity: wishlist
Tags: wontfix
Merged with 5364
Done: Juri Linkov <juri <at> jurta.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 355 in the body.
You can then email your comments to 355 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#355
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
jidanni <at> jidanni.org
:
New bug report received and forwarded. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
Today I was reading a message where this guy said
> FWIW, there are also `customize-apropos' and `customize-apropos-options'.
So I put the cursor upon the word customize-apropos-options and typed M-x,
and would you believe I had to help emacs figure out what I wanted to do,
which was of course to type M-x customize-apropos-options.
(Yes, with the assistance of TAB.)
Compare C-h f (describe-function) with the cursor in that position. It
knows what to do: prompt with what it finds under the cursor.
P.S., I cannot help with patches because I am too busy reporting bugs
I encounter in the surface interface, which I am much better at doing
than coding. Each person has things they are better at doing.
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#355
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
jpw <at> pobox.com (John Paul Wallington)
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #10 received at 355 <at> emacsbugs.donarmstrong.com (full text, mbox):
jidanni <at> jidanni.org writes:
> So I put the cursor upon the word customize-apropos-options and typed M-x,
> and would you believe I had to help emacs figure out what I wanted to do,
> which was of course to type M-x customize-apropos-options.
> (Yes, with the assistance of TAB.)
>
> Compare C-h f (describe-function) with the cursor in that position. It
> knows what to do: prompt with what it finds under the cursor.
Hm. That's an interesting idea.
> P.S., I cannot help with patches because I am too busy reporting bugs
> I encounter in the surface interface, which I am much better at doing
> than coding. Each person has things they are better at doing.
Well, a patch follows. If you could test it, I would be interested to
see whether you liked it in regular use. I'll test it for a while too.
--- keyboard.c.~1.959.~ 2008-06-02 22:07:24.000000000 +0100
+++ keyboard.c 2008-06-05 02:04:13.000000000 +0100
@@ -10451,6 +10451,7 @@
Lisp_Object prefixarg;
{
Lisp_Object function;
+ Lisp_Object symatpt;
char buf[40];
int saved_last_point_position;
Lisp_Object saved_keys, saved_last_point_position_buffer;
@@ -10491,9 +10492,16 @@
restricting to the set of all defined commands. Don't provide
any initial input. Save the command read on the extended-command
history list. */
+
+ symatpt = call0 (intern ("function-called-at-point"));
+ symatpt = (NILP (call1 (Qcommandp, symatpt))) ? Qnil : symatpt;
+
+ if (!NILP (symatpt))
+ symatpt = SYMBOL_NAME (symatpt);
+
function = Fcompleting_read (build_string (buf),
Vobarray, Qcommandp,
- Qt, Qnil, Qextended_command_history, Qnil,
+ Qt, symatpt, Qextended_command_history, Qnil,
Qnil);
#ifdef HAVE_WINDOW_SYSTEM
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#355
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
jidanni <at> jidanni.org
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #15 received at 355 <at> emacsbugs.donarmstrong.com (full text, mbox):
JPW> patch follows. If you could test it
JPW> --- keyboard.c
^^thank you but in my "apt-get install emacs" world I
don't brush with .c's, and in fact have barely the brains to test
.el's. So thank you anyway and I'm sure your fix works. OK, bye.
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#355
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Stefan Monnier <monnier <at> iro.umontreal.ca>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #20 received at 355 <at> emacsbugs.donarmstrong.com (full text, mbox):
tag 355 +wontfix
JPW> patch follows. If you could test it
JPW> --- keyboard.c
> ^^thank you but in my "apt-get install emacs" world I
> don't brush with .c's, and in fact have barely the brains to test
> .el's. So thank you anyway and I'm sure your fix works. OK, bye.
In any case, I don't think the functionality you're asking makes much
sense: it is rather rare to do a M-x where the command you want to run
happens to be under point.
Stefan
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#355
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
jpw <at> pobox.com (John Paul Wallington)
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #25 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
I neglected to CC: bug-gnu-emacs in my original reply. Do the Emacs
developers think that this feature is worth adding ?
I wrote:
> jidanni <at> jidanni.org writes:
>
>> So I put the cursor upon the word customize-apropos-options and typed M-x,
>> and would you believe I had to help emacs figure out what I wanted to do,
>> which was of course to type M-x customize-apropos-options.
>> (Yes, with the assistance of TAB.)
>>
>> Compare C-h f (describe-function) with the cursor in that position. It
>> knows what to do: prompt with what it finds under the cursor.
>
> Hm. That's an interesting idea.
>
>> P.S., I cannot help with patches because I am too busy reporting bugs
>> I encounter in the surface interface, which I am much better at doing
>> than coding. Each person has things they are better at doing.
>
> Well, a patch follows. If you could test it, I would be interested to
> see whether you liked it in regular use. I'll test it for a while too.
--- keyboard.c.~1.959.~ 2008-06-02 22:07:24.000000000 +0100
+++ keyboard.c 2008-06-05 02:04:13.000000000 +0100
@@ -10451,6 +10451,7 @@
Lisp_Object prefixarg;
{
Lisp_Object function;
+ Lisp_Object symatpt;
char buf[40];
int saved_last_point_position;
Lisp_Object saved_keys, saved_last_point_position_buffer;
@@ -10491,9 +10492,16 @@
restricting to the set of all defined commands. Don't provide
any initial input. Save the command read on the extended-command
history list. */
+
+ symatpt = call0 (intern ("function-called-at-point"));
+ symatpt = (NILP (call1 (Qcommandp, symatpt))) ? Qnil : symatpt;
+
+ if (!NILP (symatpt))
+ symatpt = SYMBOL_NAME (symatpt);
+
function = Fcompleting_read (build_string (buf),
Vobarray, Qcommandp,
- Qt, Qnil, Qextended_command_history, Qnil,
+ Qt, symatpt, Qextended_command_history, Qnil,
Qnil);
#ifdef HAVE_WINDOW_SYSTEM
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#355
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
jpw <at> pobox.com (John Paul Wallington)
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#355
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
John Paul Wallington <jpw <at> pobox.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #35 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
On 5 Jun 2008, at 20:11, John Paul Wallington wrote:
> I neglected to CC: bug-gnu-emacs in my original reply. Do the Emacs
> developers think that this feature is worth adding ?
Ooops, I missed Stef's reply to the BTS saying no. Fair enough :)
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#355
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
John Paul Wallington <jpw <at> pobox.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#355
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
jidanni <at> jidanni.org
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #45 received at 355 <at> emacsbugs.donarmstrong.com (full text, mbox):
JPW> Do the Emacs developers think that this feature is worth adding ?
JPW> Ooops, I missed Stef's reply to the BTS saying no. Fair enough :)
SM> In any case, I don't think the functionality you're asking makes much
SM> sense: it is rather rare to do a M-x where the command you want to run
SM> happens to be under point.
Just as often as C-h f and C-h v for me at least.
And why not upgrade the sensitivity of C-h v and C-h f and also make
their prompting default behavior unified with M-x. Incorporating the
John Paul Wallington bug #355 and Drew Adams bug #371 patches would be
a big step in that direction.
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#355
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
Stefan Monnier <monnier <at> iro.umontreal.ca>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #50 received at 355 <at> emacsbugs.donarmstrong.com (full text, mbox):
JPW> Do the Emacs developers think that this feature is worth adding ?
JPW> Ooops, I missed Stef's reply to the BTS saying no. Fair enough :)
SM> In any case, I don't think the functionality you're asking makes much
SM> sense: it is rather rare to do a M-x where the command you want to run
SM> happens to be under point.
> Just as often as C-h f and C-h v for me at least.
And how often is that?
For me, C-h f on the function at point is the most common use of
C-h f (I'm looking at a piece of Elisp code and want to know what the
function does).
I have a hard time believe that you often do M-x <FUN> where <FUN> is
the function at point. Please give me scenarios,
Stefan
Information forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#355
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
jidanni <at> jidanni.org
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #55 received at 355 <at> emacsbugs.donarmstrong.com (full text, mbox):
One puts the cursor on the name of a function, learns about it with
C-h f, and if what one reads sounds good, gives it a roll (a trial)
with M-x, Except no... this (M-x) time we have to type its name in
even though we are sitting on top of it, because...
SM> And how often is that?
OK, only half the functions I read about sound good enough to use M-x on.
Tags added: wontfix
Request was from
Stefan Monnier <monnier <at> iro.umontreal.ca>
to
control <at> emacsbugs.donarmstrong.com
.
(Tue, 10 Jun 2008 19:45:06 GMT)
Full text and
rfc822 format available.
Severity set to 'wishlist' from 'normal'
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Wed, 20 Jan 2010 20:43:01 GMT)
Full text and
rfc822 format available.
Merged 355 5364.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Wed, 20 Jan 2010 20:43:01 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
.
(Mon, 20 Sep 2010 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 14 years and 273 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.