dajva / rg.el

Emacs search tool based on ripgrep
https://rgel.readthedocs.io
GNU General Public License v3.0
484 stars 41 forks source link

--glob overrides any other ignore logic #46

Closed muffinmad closed 6 years ago

muffinmad commented 6 years ago

Hi!

I used * for Search in files to search in all but ignored files.

After https://github.com/dajva/rg.el/commit/dafd9e7b44e26de8ee022e7626d47495c05c13ea rg doesn't respect my ignore rules because, according to rg man, --glob option always overrides any other ignore logic.

I've tried create custom type alias like this:

(custom-set-variables
 '(rg-custom-type-aliases '(("not_ignored" . "*"))))

but searching using this type alias gives error:

/usr/local/bin/rg --color always --colors match:fg:red -n --type-add not_ignored\:\* --context 2 --follow -i --heading --column --type not_ignored -e foo
invalid definition (format is type:glob, e.g., html:*.html)

How can i search in all but ignored files?

dajva commented 6 years ago

Oh, that was an unintentional change. I guess I was to eager to get rid fo that internal "custom" type. I will revert https://github.com/dajva/rg.el/commit/dafd9e7b44e26de8ee022e7626d47495c05c13ea.

Thanks for the report. That was really fast!

dajva commented 6 years ago

BTW, the problem with your custom alias is the underscore which isn't allowed in type aliases by the rg binary.

muffinmad commented 6 years ago

Thanks!