Customizing ecb-grep to ignore user patterns

Help
2003-02-17
2003-02-18
  • I am using ecb 1.90; semantic 1.4, GNU Emacs 20.7.1.; Suse Linux 7.3

    I would like ecb to perform a recursive grep on
    a directory structure like this:

    project
    +---Inc
    +---Src

     
    • sorry, wasn't finished, yet...

      I am using ecb 1.90; semantic 1.4, GNU Emacs 20.7.1.; Suse Linux 7.3

      I would like ecb to perform a recursive grep on
      a directory structure like this:

      project
      +---Inc
      +---Src
      +---Doc

      Method names occur in Subdirectories of Inc, Src
      and Doc. They are also part of semantic.cache
      which isn't ignored by the ecb-grep.

      I would like to exclude the caches, CVS-directories
      and the Doc directory.

      I guess there is there a simple solution for that?

      Cheers
      Sascha

       
    • Klaus Berndl
      Klaus Berndl
      2003-02-18

      In general ECB does not really smart tricks for this grep feature but what it does is:

      it tempor. changes the default-directory to that directory for which the grep is called.

      Then it simply calls the functions defined in ecb-grep-function resp. ecb-grep-find-function.

      So if there is a simple solution depends on the grep-package you use:

      If you use the standard grep shipped with the compile-library of Emacs then there is no simple solution because you have to add a prune-clause to your grep call.

      If you use igrep (which i really recommand because it is much better) then you have a variable igrep-find-prune-clause which you can easily set to exclude directories (per default RCS and CVS directories are already excluded).

      To exclude semantic.cache is also easy but has to be done with semantic:

      You have to prevent semantic from creating in each directory this file which can be done with:

      (setq semanticdb-default-save-directory "~/.semantic.caches")

      Hope all this helps,
      Klaus

      P.S.
      Maybe all this should be added to the online-docu of ECB?!