Closed cpbotha closed 4 years ago
Thanks a ton for the very detailed report and investigation!
So I tried adding this in c6d76ef7717b6d59ca432a29dac62c42c3002726, but then had to revert it, then fixed the issue and pushed 32c1c3ff3ec8fb1f59ac686575968e9f603ca00b, which introduces helm-rg-default-extra-args
and helm-rg--set-extra-args
, which is by default mapped to M-m. I tried to add a test for this but was running up against the same general difficulties testing against helm as usual, (although I've had more success recently addressing testing for #14 and #15, so this should be fixed soon).
Please let me know if this addresses your use case!
And to override this, you could let
-bind helm-rg-default-extra-args
before invoking helm-rg
in your your defun
there, or you could set it as a directory-local variable!
I just changed my defun to use the new helm-rg-default-extra-args
-- looks like it works perfectly. Thank you!
When searching through my orgmode notes database with
helm-rg
, it makes the most sense seeing the results in reverse chronological order, i.e. most recently modified first. To accomplish this, I made the following function in myinit.el
that temporarily modifieshelm-rg--ripgrep-argv-format-alist
by inserting the extra ripgrep argument I need:Although this works great, it does not feel very elegant modifying a
defconst
like this. Looking through thehelm-rg
code, I did not see any other more convenient places for doing this. Did I miss something?