all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#36558: When the user forgets the filename when using M-x grep
@ 2019-07-09  0:04 積丹尼 Dan Jacobson
  2019-07-10 12:22 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 6+ messages in thread
From: 積丹尼 Dan Jacobson @ 2019-07-09  0:04 UTC (permalink / raw)
  To: 36558

I don't think the M-x grep command has the ability for the user to
change the default prompt from the current

Run grep (like this): grep --color -nH --null -e

to the rather more sophisticated

Run grep (like this): grep --color -nH --null -e [] *

where "[]" represents where the cursor should be placed when prompting
the user.

Mentioning how to do so in (info "(emacs) Grep Searching")
or indeed, simply making it the new default, would save the 98% mistake
rate of users forgetting to add a filename and think there was no
matches (as outside of emacs this would hang without a filename,
alerting the user to the problem.)

Also M-x grep should detect that something tried to read stdin, meaning
the user forgot the filename, and then warn the user, instead of just
saying "No matches".

Currently this is a very high possibility the user will just do
Run grep (like this): grep --color -nH --null -e STRING
and forget FILENAMEs
creating an impossible situation, for which emacs currently just treats
as if the user did
Run grep (like this): grep --color -nH --null -e STRING /dev/null
which helps nobody.
At least emacs should catch this situation.





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

end of thread, other threads:[~2019-07-11 18:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-09  0:04 bug#36558: When the user forgets the filename when using M-x grep 積丹尼 Dan Jacobson
2019-07-10 12:22 ` Lars Ingebrigtsen
2019-07-10 23:22   ` Tak Kunihiro
2019-07-11  0:38   ` 積丹尼 Dan Jacobson
2019-07-11  9:44     ` Tak Kunihiro
2019-07-11 18:48       ` 積丹尼 Dan Jacobson

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.