unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* grep(-find)? wish
@ 2007-07-08 15:22 Paul Pogonyshev
  2007-07-08 15:24 ` Andreas Schwab
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Pogonyshev @ 2007-07-08 15:22 UTC (permalink / raw)
  To: emacs-devel

It would be great if it was possible to do `grep XXX * -l' and then
use C-x ` to browse through matching files.  Currently, with -l
option it becomes impossible.

Paul

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

* Re: grep(-find)? wish
  2007-07-08 15:22 grep(-find)? wish Paul Pogonyshev
@ 2007-07-08 15:24 ` Andreas Schwab
  2007-07-08 15:46   ` Paul Pogonyshev
  0 siblings, 1 reply; 4+ messages in thread
From: Andreas Schwab @ 2007-07-08 15:24 UTC (permalink / raw)
  To: Paul Pogonyshev; +Cc: emacs-devel

Paul Pogonyshev <pogonyshev@gmx.net> writes:

> It would be great if it was possible to do `grep XXX * -l' and then
> use C-x ` to browse through matching files.

find-grep-dired is an interactive autoloaded Lisp function in `find-dired'.
(find-grep-dired DIR REGEXP)

Find files in DIR containing a regexp REGEXP and start Dired on output.
The command run (after changing into DIR) is

    find . -exec grep -s -e REGEXP {} \; -ls

Thus ARG can also contain additional grep options.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

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

* Re: grep(-find)? wish
  2007-07-08 15:24 ` Andreas Schwab
@ 2007-07-08 15:46   ` Paul Pogonyshev
  2007-07-08 15:52     ` Andreas Schwab
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Pogonyshev @ 2007-07-08 15:46 UTC (permalink / raw)
  To: emacs-devel; +Cc: Andreas Schwab

Andreas Schwab wrote:
> Paul Pogonyshev <pogonyshev@gmx.net> writes:
> 
> > It would be great if it was possible to do `grep XXX * -l' and then
> > use C-x ` to browse through matching files.
> 
> find-grep-dired is an interactive autoloaded Lisp function in `find-dired'.
> (find-grep-dired DIR REGEXP)
> 
> [...]

Thanks.  It would still be useful to quickly switch between find occurences/
find files with occurences with simple `-l' in command line.  For instance,
if you have a 50-characters complicated regexp, which is cumbersome to write
in two places.

Paul

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

* Re: grep(-find)? wish
  2007-07-08 15:46   ` Paul Pogonyshev
@ 2007-07-08 15:52     ` Andreas Schwab
  0 siblings, 0 replies; 4+ messages in thread
From: Andreas Schwab @ 2007-07-08 15:52 UTC (permalink / raw)
  To: Paul Pogonyshev; +Cc: emacs-devel

Paul Pogonyshev <pogonyshev@gmx.net> writes:

> Thanks.  It would still be useful to quickly switch between find occurences/
> find files with occurences with simple `-l' in command line.  For instance,
> if you have a 50-characters complicated regexp, which is cumbersome to write
> in two places.

You can always copy it through the kill ring.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

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

end of thread, other threads:[~2007-07-08 15:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-08 15:22 grep(-find)? wish Paul Pogonyshev
2007-07-08 15:24 ` Andreas Schwab
2007-07-08 15:46   ` Paul Pogonyshev
2007-07-08 15:52     ` Andreas Schwab

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).