Not long ago I updated my spacemacs develop branch and now I'm getting these errors quite frequently. Is it normal?
I can use -tmd
followed by a search pattern and it works correctly. Although in the same project -tclj
fails. The -t
option seems unreliable, so I will stick with -g
which has always worked flawlessly.
@jr0cket I think it's -tclojure
rg --type-list
should give you the full list of types and their associated extensions.
@aisamu Ah, in that case -t
works correctly for me with the latest Spacemacs develop
branch. I just updated Spacemacs and packages yesterday.
Yes, -tclojure
is the way to go - you can define your own alias -tclj
.
All of this used to work for me but it's suddenly broken 😞 (that error shown above)
I'd check that your e-macs is getting the correct path from the shell upon initialisation.
What do you get from (helm-ag--construct-do-ag-command "test")
("rg" "--vimgrep" "--no-heading" "--smart-case" "test")
The generated parameters here are a bit different (`("rg" "--smart-case" "--no-heading" "--color=never" "--line-number" "--max-columns=512" "test")`) but I can't see how that'd justify your failure. Your parameters work fine on the command line for me as well (but I get one line per match, with column information as well)
For some reason it now works better - I updated Mac OS X yesterday and also run brew upgrade
which could affect the things it works...
It happens when I'm (mis?) typing something in the helm buffer (after pressing SPC /
), for instance and it's really annoying since it breaks my flow a lot
If often happens when I try to add -t <type>
for ex. -t html
to restrict the search
Here some more details:
SPC /
followed by -t
displays this message in the mini-buffer "Error running timer: (error "Candidates function 'helml-ag-do-ag-candidate-process' should run a process")
on the latest develop & Emacs 26.3.
I am sure I have seen similar messages before, but not very often.
I use the ripgrep binary for search and I use the -g
option for narrowing down file types
https://practicalli.github.io/spacemacs/spacemacs-basics/working-with-projects/searching-projects.html
rgrep does not have a -t
option, so that may explain the error (an assumption).
Does your search binary support the -t
option an does Emacs pick up that binary in the path?
The only change I've notices around helm is to provide a fallback to Emacs fuzzy search if other search tools are not found https://github.com/syl20bnr/spacemacs/commit/c7ed2fc597e26de0f61209a4a8d63089fa2c4f3e
ripgrep does have -t
option: https://github.com/BurntSushi/ripgrep/blob/master/GUIDE.md#manual-filtering-file-types
But I was using it incorrectly (with space after -t); however, even with proper syntax it fails very early....
I guess my emacs might be using incorrect binary - how do I find that? (rg does accept the -t in shell)
Using rg
with develop (behind 71 commits, +- 1 month), no issues here. Just make sure to invoke it without a space between the flag and the type (e.g. -tclojure query
, not -t clojure query
)
$> rg --version ripgrep 11.0.2