Skip to content

excluding dirs doesn't work with grep #462

@kmatheussen

Description

@kmatheussen

The "--exclude-dir" option for grep requires a relative path, while dumb-jump provides absolute path. I fixed it like this for myself, but this breaks the other searchers so it's just a hack:

@@ -2598,7 +2599,7 @@
                (push (expand-file-name (match-string 1) local-root)
                      include))
               ((looking-at "^-/?\\(.+\\)")
-               (push (expand-file-name (match-string 1) local-root)
+               (push (match-string 1)
                      exclude)))
         (forward-line))
       (list :exclude (nreverse exclude)

Also, I can't get ag or rg to work. They only find about half of my hits. The shell command finds all hits, but only a few of them are displayed in emacs for some reason.

Also, I can't make 'git-grep' work either. It just shows result for the current repository. But not in sub directories outside the repository (which I need). Adding "+otherdirectory" doesn't help.

Anyway, great program! 'grep' with the above hack works very well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions