Fork me on GitHub

Does anyone use ripgrep? do you have problems grepping for \(when in SPC / (error in process sentinel, Invalid regex)? I’ve googled a bit and found that indeed something like that happened in rg.el package. Going to research a bit for spc /


I use pt, for no particular reason, but I haven't noticed that problem with it.


@troglotit what exactly is the problem? I'm using "rg" as default search app - it slightly differs in syntax from "ag", but it works fine for me. I often do complex queries like searching for a string in only *.cljs files with added lines above and after the line (-C key)


Wait wait wait—@ag are you saying you can do those kinds of queries from within Spacemacs? I've wanted to do this sort of thing for a while and not known how. Example: exclude results from *.json fixture files. Is that possible?


If I type --version after SPC s t p (for the pt-based search I'm used to), I get an error: > Error running timer: (error "Candidates function ‘helm-ag--do-ag-candidate-process’ should run a process")


(1) Strange that the error mentions ag instead of pt.


(2) I wonder if what you're describing is unique to rg, which I notice isn't one of the built-in tools under the SPC s menu.


I think (I need to check if that's accurate) it's because for SPC / spacemacs uses helm-ag and helm-ag can use not just ag. Anything you set in dotspacemacs-search-tools as the first thing will be used by default


yeah basically check man page for your search tool e.g. SPC h m rg - you can use some of the arguments in SPC /


I get that what you're ultimately doing is including args in the rg shell command rather than just a search string, but I think there might be some more config making that possible. I tried :(setq dotspacemacs-search-tools '("rg")) then SPC / and it immediately tells me let: Wrong type argument: commandp, helm-project-do-rg rather than letting me search helm-style. If I reset the var back to '("pt") it works fine, just without the possibility of intervening arguments.


I did this after a brew install ripgrep, and rg is a valid shell command now, but maybe I need to restart emacs? That error doesn't seem to indicate that, but who knows.


Jeff, try putting the search term first and the arguments after


Ah, that worked (with pt). Strange, but OK!


As another datapoint, for me "rg" was already first in the list. I installed ripgrep, and (`SPC /`) -g*clj foo works for me.


Oh good, it's working, NM 🙂


yeah, the way how rg works it slightly annoying, it would immediately throw some errors but if you continue typing it will search. Now I think I want to find a way to execute actual search only after pressing RET


@ag when I grep for something which starts with opening paren, e.g. \(when


@troglotit ah yeah... rg uses rust's regexp syntax that I'm too lazy to learn. for those kind of things I still use ag. SPC s a f \(when

👍 4

tbh I was absolutely happy with ag. But then spacemacs guys decided to make rg the default. I thought: "oh cool - no one confuses it with my name anymore" and did the switch.

😂 16