all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* using grep in dired mode: best method for ascii files
@ 2004-08-12 21:03 Patrick Drechsler
  2004-08-16  6:14 ` oliver
  0 siblings, 1 reply; 3+ messages in thread
From: Patrick Drechsler @ 2004-08-12 21:03 UTC (permalink / raw)


Hi,

can somebody give my a pointer in the manual on searching a
folder (including subfolders) for a regexp? The subfolder include
many binary files. I don't want to search the later.

I've tried `grep-find', 'A' and `find-grep-dired`. Also marking
the folders of interest in dired-mode. Often enough I end up
with a grep error `123'.

What I'm looking for is a command to find a regexp within my
files containing (ascii-)code.

Thankful for pointers,

Patrick
-- 
Snoopy (on being house-trained with a rolled-up newspaper): 
It does tend however to give one a rather distorted view of the press!

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

* Re: using grep in dired mode: best method for ascii files
  2004-08-12 21:03 using grep in dired mode: best method for ascii files Patrick Drechsler
@ 2004-08-16  6:14 ` oliver
  2004-08-16 19:04   ` Patrick Drechsler
  0 siblings, 1 reply; 3+ messages in thread
From: oliver @ 2004-08-16  6:14 UTC (permalink / raw)



"Patrick Drechsler" <patrick.drechsler@gmx.net> wrote in message 
news:m3u0v8dq74.fsf@pdrechsler.fqdn.th-h.de...
> Hi,
>
> can somebody give my a pointer in the manual on searching a
> folder (including subfolders) for a regexp? The subfolder include
> many binary files. I don't want to search the later.
>
> I've tried `grep-find', 'A' and `find-grep-dired`. Also marking
> the folders of interest in dired-mode. Often enough I end up
> with a grep error `123'.
>
> What I'm looking for is a command to find a regexp within my
> files containing (ascii-)code.
>
> Thankful for pointers,
>
> Patrick
> -- 
> Snoopy (on being house-trained with a rolled-up newspaper):
> It does tend however to give one a rather distorted view of the press!

you could use find-dired to execute something like:

find . \( -name <file-patten> -exec grep -q <in-file-search-pattern> {} \; 
\) -exec ls -lGd {} \;

find-grep-dired unfortunaly goes through all readable files it finds on its 
way. of course you could make your own extended "find-in-files-grep-dired", 
were you asked the user for a third string representing the file-pattern and 
put something like above together.

cheers, oliver 

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

* Re: using grep in dired mode: best method for ascii files
  2004-08-16  6:14 ` oliver
@ 2004-08-16 19:04   ` Patrick Drechsler
  0 siblings, 0 replies; 3+ messages in thread
From: Patrick Drechsler @ 2004-08-16 19:04 UTC (permalink / raw)



oliver wrote on 16 Aug 2004 07:14:12 MET:

> "Patrick Drechsler" <patrick.drechsler@gmx.net> wrote in message 
> news:m3u0v8dq74.fsf@pdrechsler.fqdn.th-h.de...
>>
>> can somebody give my a pointer in the manual on searching a
>> folder (including subfolders) for a regexp? The subfolder
>> include many binary files. I don't want to search the later.
>>
>> I've tried `grep-find', 'A' and `find-grep-dired`. Also
>> marking the folders of interest in dired-mode. Often enough I
>> end up with a grep error `123'.
>>
>> What I'm looking for is a command to find a regexp within my
>> files containing (ascii-)code.
[...]

> you could use find-dired to execute something like:
>
> find . \( -name <file-patten> -exec grep -q
> <in-file-search-pattern> {} \; \) -exec ls -lGd {} \;
>
> find-grep-dired unfortunaly goes through all readable files it
> finds on its way. of course you could make your own extended
> "find-in-files-grep-dired", were you asked the user for a third
> string representing the file-pattern and put something like
> above together.

Hi Oliver,

thanks for the example and the explanation! I'll give it a try
and see how far I get with my lisp knowledge ;-)

Cheers

Patrick
-- 
There are two major products that come out of Berkeley: LSD and UNIX.
We don't believe this to be a coincidence.
Jeremy S. Anderson

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

end of thread, other threads:[~2004-08-16 19:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-12 21:03 using grep in dired mode: best method for ascii files Patrick Drechsler
2004-08-16  6:14 ` oliver
2004-08-16 19:04   ` Patrick Drechsler

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.