When running grep in a large project that uses directory inclusion, you
need to run it once for each separate included directory.  That's what I've
done here.


On Fri, Apr 12, 2013 at 8:29 AM, Bozhidar Batsov
<notifications@github.com>wrote:

> In projectile.el:
>
> >                             (buffer-substring (region-beginning) (region-end))
> > -                         (read-string (projectile-prepend-project-name "Grep for: ") (thing-at-point 'symbol))))
> > -        (root-dir (expand-file-name (projectile-project-root))))
> > -    (require 'grep)
> > -    ;; paths for find-grep should relative and without trailing /
> > -    (let ((grep-find-ignored-directories (append (-map (lambda (dir) (s-chop-suffix "/" (s-replace root-dir "" dir))) (projectile-ignored-directories)) grep-find-ignored-directories))
> > -          (grep-find-ignored-files (append (-map (lambda (file) (s-replace root-dir "" file)) (projectile-ignored-files)) grep-find-ignored-files)))
> > -      (grep-compute-defaults)
> > -      (rgrep search-regexp "* .*" root-dir))))
> > +                         (read-string (projectile-prepend-project-name "Grep for: ") (thing-at-point 'symbol)))))
> > +    (dolist (root-dir roots)
>
> I totally missed this bit. The code here is pretty broken - you're running
> rgrep once for each root, when instead you should be ignoring all folders
> except the roots.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/bbatsov/projectile/pull/88/files#r3771083>
> .
>