GNU bug report logs - #13693
M-x grep should do some basic parameter checking

Previous Next

Package: emacs;

Reported by: jidanni <at> jidanni.org

Date: Tue, 12 Feb 2013 05:50:02 UTC

Severity: wishlist

Tags: wontfix

Merged with 1863, 6553

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 13693 in the body.
You can then email your comments to 13693 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#13693; Package emacs. (Tue, 12 Feb 2013 05:50:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to jidanni <at> jidanni.org:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 12 Feb 2013 05:50:03 GMT) Full text and rfc822 format available.

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

From: jidanni <at> jidanni.org
To: bug-gnu-emacs <at> gnu.org
Subject: M-x grep should do some basic parameter checking
Date: Tue, 12 Feb 2013 13:49:04 +0800
Why doesn't M-x grep check that it has been given at least two
parameters, else it is bound to fail, as
$ grep
$ grep pattern
won't get far without some file arguments.

Yes
$ grep pattern pattern #wrong
will still pass as that would look the same as
$ grep pattern file
etc. but the check would be better than nothing.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13693; Package emacs. (Tue, 12 Feb 2013 18:00:03 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> jurta.org>
To: jidanni <at> jidanni.org
Cc: 13693 <at> debbugs.gnu.org
Subject: Re: bug#13693: M-x grep should do some basic parameter checking
Date: Tue, 12 Feb 2013 19:52:10 +0200
> Why doesn't M-x grep check that it has been given at least
> two parameters

Why two?  For example, for "git-grep pattern" just one is enough.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13693; Package emacs. (Tue, 12 Feb 2013 21:03:02 GMT) Full text and rfc822 format available.

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

From: jidanni <at> jidanni.org
To: juri <at> jurta.org
Cc: 13693 <at> debbugs.gnu.org
Subject: Re: bug#13693: M-x grep should do some basic parameter checking
Date: Wed, 13 Feb 2013 05:02:19 +0800
>>>>> "JL" == Juri Linkov <juri <at> jurta.org> writes:
>> Why doesn't M-x grep check that it has been given at least
>> two parameters

JL> Why two?  For example, for "git-grep pattern" just one is enough.

$ emacs
(grep "grep -nH -e love")
Will always fail. And the user will think "well, I can't find the love
letter she sent me, and thus can't find her address, so I will just give
up," when all along he just forgot to give the filename.

Whereas normally
$ grep love
would hang, waiting for input, so he would know that the relationship
still had a chance, and it was just emacs that was the reason the two
would have lost touch...




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13693; Package emacs. (Wed, 13 Feb 2013 08:48:01 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> jurta.org>
To: jidanni <at> jidanni.org
Cc: 13693 <at> debbugs.gnu.org
Subject: Re: bug#13693: M-x grep should do some basic parameter checking
Date: Wed, 13 Feb 2013 10:46:18 +0200
> $ emacs
> (grep "grep -nH -e love")
> Will always fail. And the user will think "well, I can't find the love
> letter she sent me, and thus can't find her address, so I will just give
> up," when all along he just forgot to give the filename.
>
> Whereas normally
> $ grep love
> would hang, waiting for input, so he would know that the relationship
> still had a chance, and it was just emacs that was the reason the two
> would have lost touch...

If you tend to forget the pattern or file argument there is a reliable grep
known as `M-x rgrep' that asks you what and where to search.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13693; Package emacs. (Wed, 13 Feb 2013 08:57:01 GMT) Full text and rfc822 format available.

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

From: jidanni <at> jidanni.org
To: juri <at> jurta.org
Cc: 13693 <at> debbugs.gnu.org
Subject: Re: bug#13693: M-x grep should do some basic parameter checking
Date: Wed, 13 Feb 2013 16:55:53 +0800
>>>>> "JL" == Juri Linkov <juri <at> jurta.org> writes:

JL> If you tend to forget the pattern or file argument there is a reliable grep
JL> known as `M-x rgrep' that asks you what and where to search.

Yes, I use that too.

And that is what is causing me to even remember less that M-x grep needs
more arguments when I use it !




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13693; Package emacs. (Thu, 14 Feb 2013 09:25:02 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> jurta.org>
To: jidanni <at> jidanni.org
Cc: 13693 <at> debbugs.gnu.org
Subject: Re: bug#13693: M-x grep should do some basic parameter checking
Date: Thu, 14 Feb 2013 11:23:23 +0200
> JL> If you tend to forget the pattern or file argument there is a reliable grep
> JL> known as `M-x rgrep' that asks you what and where to search.
>
> Yes, I use that too.
>
> And that is what is causing me to even remember less that M-x grep needs
> more arguments when I use it !

Then customize `grep-command' to something like "grep -nH -e pattern *"
that would remind you to replace the default search string "pattern"
and to replace "*" with actual file names to search.




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.

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