all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* how to tell find-grep-dired  skip  binary files?
@ 2008-06-03 10:15 sunway
  2008-06-03 10:32 ` weber
  0 siblings, 1 reply; 5+ messages in thread
From: sunway @ 2008-06-03 10:15 UTC (permalink / raw)
  To: help-gnu-emacs

when using find-grep-dired in dired, I only care about plain text
files like *.c, *.cpp,etc, How to tell find-grep-dired skip files I
don't care,like binary files and .svn/*..


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

* Re: how to tell find-grep-dired skip binary files?
  2008-06-03 10:15 how to tell find-grep-dired skip binary files? sunway
@ 2008-06-03 10:32 ` weber
  2008-06-03 11:15   ` sunway
  0 siblings, 1 reply; 5+ messages in thread
From: weber @ 2008-06-03 10:32 UTC (permalink / raw)
  To: help-gnu-emacs

On Jun 3, 7:15 am, sunway <sunwayfore...@gmail.com> wrote:
> when using find-grep-dired in dired, I only care about plain text
> files like *.c, *.cpp,etc, How to tell find-grep-dired skip files I
> don't care,like binary files and .svn/*..

From the man

       -I     Process  a  binary file as if it did not contain
matching data; this is equivalent to the --binary-files=without-match
option.

so just add -I to the find-grep-options variable and you're good to
go.

HTH,
Hugo


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

* Re: how to tell find-grep-dired skip binary files?
  2008-06-03 10:32 ` weber
@ 2008-06-03 11:15   ` sunway
  2008-06-03 13:51     ` Thierry Volpiatto
  2008-06-03 18:33     ` Eli Zaretskii
  0 siblings, 2 replies; 5+ messages in thread
From: sunway @ 2008-06-03 11:15 UTC (permalink / raw)
  To: help-gnu-emacs

On Jun 3, 6:32 pm, weber <hug...@gmail.com> wrote:
> On Jun 3, 7:15 am, sunway <sunwayfore...@gmail.com> wrote:
>
> > when using find-grep-dired in dired, I only care about plain text
> > files like *.c, *.cpp,etc, How to tell find-grep-dired skip files I
> > don't care,like binary files and .svn/*..
>
> From the man
>
>        -I     Process  a  binary file as if it did not contain
> matching data; this is equivalent to the --binary-files=without-match
> option.
>
> so just add -I to the find-grep-options variable and you're good to
> go.
>
> HTH,
> Hugo

that helps, but how to ignore files like  .svn/* also?


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

* Re: how to tell find-grep-dired skip binary files?
  2008-06-03 11:15   ` sunway
@ 2008-06-03 13:51     ` Thierry Volpiatto
  2008-06-03 18:33     ` Eli Zaretskii
  1 sibling, 0 replies; 5+ messages in thread
From: Thierry Volpiatto @ 2008-06-03 13:51 UTC (permalink / raw)
  To: sunway; +Cc: help-gnu-emacs

sunway <sunwayforever@gmail.com> writes:

> On Jun 3, 6:32 pm, weber <hug...@gmail.com> wrote:
>> On Jun 3, 7:15 am, sunway <sunwayfore...@gmail.com> wrote:
>>
>> > when using find-grep-dired in dired, I only care about plain text
>> > files like *.c, *.cpp,etc, How to tell find-grep-dired skip files I
>> > don't care,like binary files and .svn/*..
>>
>> From the man
>>
>>        -I     Process  a  binary file as if it did not contain
>> matching data; this is equivalent to the --binary-files=without-match
>> option.
>>
>> so just add -I to the find-grep-options variable and you're good to
>> go.
>>
>> HTH,
>> Hugo
>
> that helps, but how to ignore files like  .svn/* also?
>
Alternatively, you can use TraverseDirectory that work with python as
backend:
Thats faster than grep/find and fully configurable.(just add .svn or
what you want to the conf file)

http://www.emacswiki.org/cgi-bin/wiki/TraverseDirectory 

-- 
A + Thierry
Pub key: http://pgp.mit.edu




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

* Re: how to tell find-grep-dired skip binary files?
  2008-06-03 11:15   ` sunway
  2008-06-03 13:51     ` Thierry Volpiatto
@ 2008-06-03 18:33     ` Eli Zaretskii
  1 sibling, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2008-06-03 18:33 UTC (permalink / raw)
  To: help-gnu-emacs

> From: sunway <sunwayforever@gmail.com>
> Date: Tue, 3 Jun 2008 04:15:41 -0700 (PDT)
> 
> that helps, but how to ignore files like  .svn/* also?

There's the --exclude=PATTERN option to Grep.

Btw, "grep --help" displays all that info, so I'm curious how come you
didn't find this out yourself.




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

end of thread, other threads:[~2008-06-03 18:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-03 10:15 how to tell find-grep-dired skip binary files? sunway
2008-06-03 10:32 ` weber
2008-06-03 11:15   ` sunway
2008-06-03 13:51     ` Thierry Volpiatto
2008-06-03 18:33     ` Eli Zaretskii

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.