unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* find-grep-dired: skip .git
@ 2014-04-17 12:19 Torsten Bronger
  2014-04-17 14:56 ` Yuri Khan
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Torsten Bronger @ 2014-04-17 12:19 UTC (permalink / raw)
  To: help-gnu-emacs

Hallöchen!

I think my find-grep-dired actions lose a lot of time in .git
subdirs.  Can I tell Emacs somehow to skip them always?

Tschö,
Torsten.

-- 
Torsten Bronger    Jabber ID: torsten.bronger@jabber.rwth-aachen.de
                                  or http://bronger-jmp.appspot.com


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

* Re: find-grep-dired: skip .git
  2014-04-17 12:19 find-grep-dired: skip .git Torsten Bronger
@ 2014-04-17 14:56 ` Yuri Khan
  2014-04-17 15:00 ` Eli Zaretskii
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Yuri Khan @ 2014-04-17 14:56 UTC (permalink / raw)
  To: Torsten Bronger; +Cc: help-gnu-emacs@gnu.org

On Thu, Apr 17, 2014 at 7:19 PM, Torsten Bronger
<bronger@physik.rwth-aachen.de> wrote:

> I think my find-grep-dired actions lose a lot of time in .git
> subdirs.  Can I tell Emacs somehow to skip them always?

Although this is not what you ask for, you might try ‘grep’ using the
following value of ‘grep-command’:

git --no-pager grep -nH -Ee ''

(you put the regexp between those quotes).


Alternatively, you might try diving into sources of ‘find-grep-dired’
and getting dired to run on the result of “git --no-pager grep -l -Ee
'your_regex' | xargs ls”, but this assumes you are on a unix-like
system.



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

* Re: find-grep-dired: skip .git
  2014-04-17 12:19 find-grep-dired: skip .git Torsten Bronger
  2014-04-17 14:56 ` Yuri Khan
@ 2014-04-17 15:00 ` Eli Zaretskii
       [not found] ` <mailman.19778.1397746836.10748.help-gnu-emacs@gnu.org>
  2014-04-17 15:16 ` Sergei Organov
  3 siblings, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2014-04-17 15:00 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Torsten Bronger <bronger@physik.rwth-aachen.de>
> Date: Thu, 17 Apr 2014 14:19:44 +0200
> 
> I think my find-grep-dired actions lose a lot of time in .git
> subdirs.  Can I tell Emacs somehow to skip them always?

From "grep --help":

   --exclude-dir=PATTERN  directories that match PATTERN will be skipped.



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

* Re: find-grep-dired: skip .git
       [not found] ` <mailman.19778.1397746836.10748.help-gnu-emacs@gnu.org>
@ 2014-04-17 15:10   ` Torsten Bronger
  0 siblings, 0 replies; 5+ messages in thread
From: Torsten Bronger @ 2014-04-17 15:10 UTC (permalink / raw)
  To: help-gnu-emacs

Hallöchen!

Eli Zaretskii writes:

>> From: Torsten Bronger <bronger@physik.rwth-aachen.de>
>> Date: Thu, 17 Apr 2014 14:19:44 +0200
>> 
>> I think my find-grep-dired actions lose a lot of time in .git
>> subdirs.  Can I tell Emacs somehow to skip them always?
>
> From "grep --help":
>
>    --exclude-dir=PATTERN  directories that match PATTERN will be skipped.

Unfortunately, find-grep-dired calls grep file by file.

Tschö,
Torsten.

-- 
Torsten Bronger    Jabber ID: torsten.bronger@jabber.rwth-aachen.de
                                  or http://bronger-jmp.appspot.com


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

* Re: find-grep-dired: skip .git
  2014-04-17 12:19 find-grep-dired: skip .git Torsten Bronger
                   ` (2 preceding siblings ...)
       [not found] ` <mailman.19778.1397746836.10748.help-gnu-emacs@gnu.org>
@ 2014-04-17 15:16 ` Sergei Organov
  3 siblings, 0 replies; 5+ messages in thread
From: Sergei Organov @ 2014-04-17 15:16 UTC (permalink / raw)
  To: help-gnu-emacs

Torsten Bronger <bronger@physik.rwth-aachen.de> writes:
> Hallöchen!
>
> I think my find-grep-dired actions lose a lot of time in .git
> subdirs.  Can I tell Emacs somehow to skip them always?

Dunno, but here is an idea. Below is what igrep-find uses not to search in
RCS/CVS/SCCS directories:

find ~/src -type d \( -name RCS -o -name CVS -o -name SCCS \) -prune -o -follow -type f \! -name \*~ \! -name \*\,v \! -name s.\* \! -name .\#\* -name \*.\[ch\]\* -print0 | xargs -0 -e grep -n  -e PATTERN  /dev/null





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

end of thread, other threads:[~2014-04-17 15:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-17 12:19 find-grep-dired: skip .git Torsten Bronger
2014-04-17 14:56 ` Yuri Khan
2014-04-17 15:00 ` Eli Zaretskii
     [not found] ` <mailman.19778.1397746836.10748.help-gnu-emacs@gnu.org>
2014-04-17 15:10   ` Torsten Bronger
2014-04-17 15:16 ` Sergei Organov

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).