GNU bug report logs - #1863
Improved grep prompt

Previous Next

Package: emacs;

Reported by: jidanni <at> jidanni.org

Date: Mon, 12 Jan 2009 02:15:02 UTC

Severity: wishlist

Tags: wontfix

Merged with 6553, 13693

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 1863 in the body.
You can then email your comments to 1863 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-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1863; Package emacs. (Mon, 12 Jan 2009 02:15:02 GMT) 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>. (Mon, 12 Jan 2009 02:15:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: jidanni <at> jidanni.org
To: bug-gnu-emacs <at> gnu.org
Subject: Improved grep prompt
Date: Mon, 12 Jan 2009 10:07:45 +0800
Regarding M-x grep, here are the current and improved prompts:
Run grep (like this): grep -nH -e
Run grep (like this): grep -nH -e [Cursor goes here] * <--and an asterisk here. I.e., @=cursor:
Run grep (like this): grep -nH -e @ *
If you use my improved prompt suggestion above, no longer will
everybody forget to add a filename, and leave thinking "no matches found".





Severity set to `wishlist' from `normal' Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Mon, 12 Jan 2009 22:15:02 GMT) 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#1863; Package emacs. (Wed, 14 Jan 2009 01:30:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Juri Linkov <juri <at> jurta.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Wed, 14 Jan 2009 01:30:03 GMT) Full text and rfc822 format available.

Message #12 received at 1863 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: jidanni <at> jidanni.org
Cc: 1863 <at> debbugs.gnu.org
Subject: Re: bug#1863: Improved grep prompt
Date: Wed, 14 Jan 2009 03:18:22 +0200
> Regarding M-x grep, here are the current and improved prompts:
> Run grep (like this): grep -nH -e
> Run grep (like this): grep -nH -e [Cursor goes here] * <--and an asterisk here. I.e., @=cursor:
> Run grep (like this): grep -nH -e @ *
> If you use my improved prompt suggestion above, no longer will
> everybody forget to add a filename, and leave thinking "no matches found".

Everybody's using rgrep and lgrep these days and never forget a filename ;-)

-- 
Juri Linkov
http://www.jurta.org/emacs/




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1863; Package emacs. (Wed, 14 Jan 2009 01:40:03 GMT) 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>. (Wed, 14 Jan 2009 01:40:03 GMT) Full text and rfc822 format available.

Message #17 received at 1863 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: jidanni <at> jidanni.org
To: juri <at> jurta.org
Cc: 1863 <at> debbugs.gnu.org
Subject: Re: bug#1863: Improved grep prompt
Date: Wed, 14 Jan 2009 09:33:51 +0800
JL> Everybody's using rgrep and lgrep these days
Well I would make M-x grep say that then, with a an option available
for those who really want to use the old grep even after finally
learning this news.




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1863; Package emacs. (Thu, 15 Jan 2009 00:25:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Juri Linkov <juri <at> jurta.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Thu, 15 Jan 2009 00:25:05 GMT) Full text and rfc822 format available.

Message #22 received at 1863 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: jidanni <at> jidanni.org
Cc: 1863 <at> debbugs.gnu.org
Subject: Re: bug#1863: Improved grep prompt
Date: Thu, 15 Jan 2009 01:52:09 +0200
> JL> Everybody's using rgrep and lgrep these days
> Well I would make M-x grep say that then,

It already says that.
`C-h f grep RET':

    For doing a recursive `grep', see the `rgrep' command.
    For running `grep' in a specific directory, see `lgrep'.

> with a an option available for those who really want to use the old
> grep even after finally learning this news.

There is already a template option for the old `grep'.
`C-h v grep-command RET':

    grep-command is a variable defined in `grep.el'.
    Its value is "grep -nH -e *"

    Documentation:
    The default grep command for M-g r e.

-- 
Juri Linkov
http://www.jurta.org/emacs/




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1863; Package emacs. (Thu, 15 Jan 2009 00:50:02 GMT) 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>. (Thu, 15 Jan 2009 00:50:03 GMT) Full text and rfc822 format available.

Message #27 received at 1863 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: jidanni <at> jidanni.org
To: juri <at> jurta.org
Cc: 1863 <at> debbugs.gnu.org
Subject: Re: bug#1863: Improved grep prompt
Date: Thu, 15 Jan 2009 08:40:39 +0800
JL> It already says that.
JL> `C-h f grep RET':
But nobody would look there often. All I know is I took the Tutorial
in the 80's and would never know about the two new greps unless
alerted somehow.
JL> There is already a template option for the old `grep'.
JL>     grep-command is a variable defined in `grep.el'.
JL>     Its value is "grep -nH -e *"
Ah, newer than Debian sid. OK, doing
(setq grep-command "grep -nHe *"); until emacs 23
By the way, you can combine the nH and e options to save some minibuffer.




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1863; Package emacs. (Thu, 15 Jan 2009 01:15:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Lennart Borgman <lennart.borgman <at> gmail.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Thu, 15 Jan 2009 01:15:03 GMT) Full text and rfc822 format available.

Message #32 received at 1863 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Lennart Borgman <lennart.borgman <at> gmail.com>
To: jidanni <at> jidanni.org, 1863 <at> debbugs.gnu.org
Cc: juri <at> jurta.org
Subject: Re: bug#1863: Improved grep prompt
Date: Thu, 15 Jan 2009 02:09:19 +0100
On Thu, Jan 15, 2009 at 1:40 AM,  <jidanni <at> jidanni.org> wrote:
> JL> It already says that.
> JL> `C-h f grep RET':
> But nobody would look there often. All I know is I took the Tutorial
> in the 80's and would never know about the two new greps unless
> alerted somehow.

In your case I myself see nothing that can help then ;-) but I think
newbees would benefit from having all the search and replace commands
under search and replace in the edit menu.

Otherwise the wheel will be invented over and over.




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1863; Package emacs. (Thu, 15 Jan 2009 01:40:09 GMT) Full text and rfc822 format available.

Acknowledgement sent to Juri Linkov <juri <at> jurta.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Thu, 15 Jan 2009 01:40:09 GMT) Full text and rfc822 format available.

Message #37 received at 1863 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: Lennart Borgman <lennart.borgman <at> gmail.com>
Cc: jidanni <at> jidanni.org, 1863 <at> debbugs.gnu.org
Subject: Re: bug#1863: Improved grep prompt
Date: Thu, 15 Jan 2009 03:27:29 +0200
>> JL> It already says that.
>> JL> `C-h f grep RET':
>> But nobody would look there often. All I know is I took the Tutorial
>> in the 80's and would never know about the two new greps unless
>> alerted somehow.
>
> In your case I myself see nothing that can help then ;-) but I think
> newbees would benefit from having all the search and replace commands
> under search and replace in the edit menu.

I can't believe we still don't have these useful commands in the menu.
But why do you think they should be placed in the Edit menu?

-- 
Juri Linkov
http://www.jurta.org/emacs/




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1863; Package emacs. (Thu, 15 Jan 2009 02:05:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Lennart Borgman <lennart.borgman <at> gmail.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Thu, 15 Jan 2009 02:05:05 GMT) Full text and rfc822 format available.

Message #42 received at 1863 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Lennart Borgman <lennart.borgman <at> gmail.com>
To: Juri Linkov <juri <at> jurta.org>
Cc: jidanni <at> jidanni.org, 1863 <at> debbugs.gnu.org
Subject: Re: bug#1863: Improved grep prompt
Date: Thu, 15 Jan 2009 02:55:04 +0100
On Thu, Jan 15, 2009 at 2:27 AM, Juri Linkov <juri <at> jurta.org> wrote:
>>> JL> It already says that.
>>> JL> `C-h f grep RET':
>>> But nobody would look there often. All I know is I took the Tutorial
>>> in the 80's and would never know about the two new greps unless
>>> alerted somehow.
>>
>> In your case I myself see nothing that can help then ;-) but I think
>> newbees would benefit from having all the search and replace commands
>> under search and replace in the edit menu.
>
> I can't believe we still don't have these useful commands in the menu.
> But why do you think they should be placed in the Edit menu?

That is where the search and replace commands normally are. Why do you
doubt they should be there?




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1863; Package emacs. (Thu, 15 Jan 2009 03:00:03 GMT) 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>. (Thu, 15 Jan 2009 03:00:03 GMT) Full text and rfc822 format available.

Message #47 received at 1863 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: jidanni <at> jidanni.org
Cc: 1863 <at> debbugs.gnu.org, juri <at> jurta.org
Subject: Re: bug#1863: Improved grep prompt
Date: Wed, 14 Jan 2009 21:54:02 -0500
You can also use C-u M-x grep.
That's what I use, personally.


        Stefan




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1863; Package emacs. (Fri, 16 Jan 2009 00:50:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Juri Linkov <juri <at> jurta.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Fri, 16 Jan 2009 00:50:04 GMT) Full text and rfc822 format available.

Message #52 received at 1863 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: Lennart Borgman <lennart.borgman <at> gmail.com>
Cc: jidanni <at> jidanni.org, 1863 <at> debbugs.gnu.org
Subject: Re: bug#1863: Improved grep prompt
Date: Fri, 16 Jan 2009 02:31:03 +0200
>>> In your case I myself see nothing that can help then ;-) but I think
>>> newbees would benefit from having all the search and replace commands
>>> under search and replace in the edit menu.
>>
>> I can't believe we still don't have these useful commands in the menu.
>> But why do you think they should be placed in the Edit menu?
>
> That is where the search and replace commands normally are. Why do you
> doubt they should be there?

The `Grep' menu entry is traditionally in the Tools menu because it reads
an external command like `Compile' and `Shell Command' do.  So perhaps we
should add `rgrep' and `lgrep' to the Tools menu.

A less controversial change is to add `rgrep' and `lgrep' to the
grep mode menu:

Index: lisp/progmodes/grep.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/progmodes/grep.el,v
retrieving revision 1.98
diff -u -r1.98 grep.el
--- lisp/progmodes/grep.el	5 Jan 2009 03:23:37 -0000	1.98
+++ lisp/progmodes/grep.el	16 Jan 2009 00:27:48 -0000
@@ -204,12 +204,18 @@
     (define-key map [menu-bar grep compilation-compile]
       '(menu-item "Compile..." compile
 		  :help "Compile the program including the current buffer.  Default: run `make'"))
+    (define-key map [menu-bar grep compilation-lgrep]
+      '(menu-item "Local grep..." lgrep
+		  :help "User-friendly grep"))
+    (define-key map [menu-bar grep compilation-rgrep]
+      '(menu-item "Recursive grep..." rgrep
+		  :help "User-friendly recursive grep in directory tree"))
+    (define-key map [menu-bar grep compilation-grep-find]
+      '(menu-item "Grep via Find..." grep-find
+		  :help "Run grep via find, with user-specified args"))
     (define-key map [menu-bar grep compilation-grep]
       '(menu-item "Another grep..." grep
 		  :help "Run grep, with user-specified args, and collect output in a buffer."))
-    (define-key map [menu-bar grep compilation-grep-find]
-      '(menu-item "Recursive grep..." grep-find
-		  :help "Run grep via find, with user-specified args"))
     (define-key map [menu-bar grep compilation-recompile]
       '(menu-item "Repeat grep" recompile
 		  :help "Run grep again"))

-- 
Juri Linkov
http://www.jurta.org/emacs/




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1863; Package emacs. (Fri, 16 Jan 2009 01:00:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Lennart Borgman <lennart.borgman <at> gmail.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Fri, 16 Jan 2009 01:00:04 GMT) Full text and rfc822 format available.

Message #57 received at 1863 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Lennart Borgman <lennart.borgman <at> gmail.com>
To: Juri Linkov <juri <at> jurta.org>
Cc: jidanni <at> jidanni.org, 1863 <at> debbugs.gnu.org
Subject: Re: bug#1863: Improved grep prompt
Date: Fri, 16 Jan 2009 01:54:06 +0100
On Fri, Jan 16, 2009 at 1:31 AM, Juri Linkov <juri <at> jurta.org> wrote:
>>>> In your case I myself see nothing that can help then ;-) but I think
>>>> newbees would benefit from having all the search and replace commands
>>>> under search and replace in the edit menu.
>>>
>>> I can't believe we still don't have these useful commands in the menu.
>>> But why do you think they should be placed in the Edit menu?
>>
>> That is where the search and replace commands normally are. Why do you
>> doubt they should be there?
>
> The `Grep' menu entry is traditionally in the Tools menu because it reads
> an external command like `Compile' and `Shell Command' do.  So perhaps we
> should add `rgrep' and `lgrep' to the Tools menu.

I think menus should see things from the users view, not from an
internal view. Emacs itself does not really care how the menus look
...

I would expect nearly all users to look for these commands in the Edit menu.




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1863; Package emacs. (Fri, 16 Jan 2009 09:35:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to richardeng <richardeng <at> foxmail.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Fri, 16 Jan 2009 09:35:03 GMT) Full text and rfc822 format available.

Message #62 received at 1863 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: richardeng <richardeng <at> foxmail.com>
To: Juri Linkov <juri <at> jurta.org>, 1863 <at> debbugs.gnu.org
Cc: Lennart Borgman <lennart.borgman <at> gmail.com>, jidanni <at> jidanni.org
Subject: Re: bug#1863: Improved grep prompt
Date: Fri, 16 Jan 2009 17:27:33 +0800
[Message part 1 (text/plain, inline)]
Juri Linkov wrote:
>>>> In your case I myself see nothing that can help then ;-) but I think
>>>> newbees would benefit from having all the search and replace commands
>>>> under search and replace in the edit menu.
>>>>         
>>> I can't believe we still don't have these useful commands in the menu.
>>> But why do you think they should be placed in the Edit menu?
>>>       
>> That is where the search and replace commands normally are. Why do you
>> doubt they should be there?
>>     
>
> The `Grep' menu entry is traditionally in the Tools menu because it reads
> an external command like `Compile' and `Shell Command' do.  So perhaps we
> should add `rgrep' and `lgrep' to the Tools menu.
>
> A less controversial change is to add `rgrep' and `lgrep' to the
> grep mode menu:
>
> Index: lisp/progmodes/grep.el
> ===================================================================
> RCS file: /sources/emacs/emacs/lisp/progmodes/grep.el,v
> retrieving revision 1.98
> diff -u -r1.98 grep.el
> --- lisp/progmodes/grep.el	5 Jan 2009 03:23:37 -0000	1.98
> +++ lisp/progmodes/grep.el	16 Jan 2009 00:27:48 -0000
> @@ -204,12 +204,18 @@
>      (define-key map [menu-bar grep compilation-compile]
>        '(menu-item "Compile..." compile
>  		  :help "Compile the program including the current buffer.  Default: run `make'"))
> +    (define-key map [menu-bar grep compilation-lgrep]
> +      '(menu-item "Local grep..." lgrep
> +		  :help "User-friendly grep"))
> +    (define-key map [menu-bar grep compilation-rgrep]
> +      '(menu-item "Recursive grep..." rgrep
> +		  :help "User-friendly recursive grep in directory tree"))
> +    (define-key map [menu-bar grep compilation-grep-find]
> +      '(menu-item "Grep via Find..." grep-find
> +		  :help "Run grep via find, with user-specified args"))
>      (define-key map [menu-bar grep compilation-grep]
>        '(menu-item "Another grep..." grep
>  		  :help "Run grep, with user-specified args, and collect output in a buffer."))
> -    (define-key map [menu-bar grep compilation-grep-find]
> -      '(menu-item "Recursive grep..." grep-find
> -		  :help "Run grep via find, with user-specified args"))
>      (define-key map [menu-bar grep compilation-recompile]
>        '(menu-item "Repeat grep" recompile
>  		  :help "Run grep again"))
>
>   
I think many emacs users discovery useful command from the menu instead 
of  searching the release notes.
I suggest to add rgrep,lgrep,grep-find to menu.


[Message part 2 (text/html, inline)]

Merged 1863 13693. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Fri, 15 Feb 2013 22:11:02 GMT) Full text and rfc822 format available.

Merged 1863 6553 13693. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Fri, 15 Feb 2013 22:12:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#1863; Package emacs. (Sun, 15 Apr 2018 22:13:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Juri Linkov <juri <at> jurta.org>
Cc: 1863 <at> debbugs.gnu.org, jidanni <at> jidanni.org
Subject: Re: bug#1863: Improved grep prompt
Date: Mon, 16 Apr 2018 00:12:19 +0200
Juri Linkov <juri <at> jurta.org> writes:

>> Regarding M-x grep, here are the current and improved prompts:
>> Run grep (like this): grep -nH -e
>> Run grep (like this): grep -nH -e [Cursor goes here] * <--and an asterisk here. I.e., @=cursor:
>> Run grep (like this): grep -nH -e @ *
>> If you use my improved prompt suggestion above, no longer will
>> everybody forget to add a filename, and leave thinking "no matches found".
>
> Everybody's using rgrep and lgrep these days and never forget a filename ;-)

It seemed like nobody were enthusiastic about adding such a fix, so I'm
closing this as a "wontfix".

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




Added tag(s) wontfix. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 15 Apr 2018 22:13:03 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 1863 <at> debbugs.gnu.org and jidanni <at> jidanni.org Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 15 Apr 2018 22:13:03 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, 14 May 2018 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 39 days ago.

Previous Next


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