emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

M-x grep should hang if no files specified


From: Dan Jacobson
Subject: M-x grep should hang if no files specified
Date: Mon, 13 Nov 2006 00:15:45 +0800

Let's explore what happens when the user forgets the final argument of
(grep "grep -nH -e bla *"), giving instead
(grep "grep -nH -e bla")

  Grep started at Thu Nov  9 20:52:01

  grep -nH -e bla

  Grep finished with no matches found at Thu Nov  9 20:52:01

Well, in the real world of the shell, this would have just hung
waiting for stdin.  So how about letting it hang until ^G, instead of
making the user think gosh, no matches. Too bad.

I mean you've got tons of other grep related functions that have a
default of the current directory, so one doesn't always remember to
add more than the pattern as a habit.

Back in emacs21, the user would at least see

  grep -n -e bla /dev/null

And he would think oh what a dipswitch I am, and try again adding the
file argument. Whereas in emacs22, probably due to yours truly's
suggestions, there is no more /dev/null visual reminder.

So the solution is still to do what real grep in the shell does, hang.
No need to say "Holmes, you forgot the filename", or prompt for it...
I guess.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]