Open hmelman opened 1 month ago
Don't think that is easily doable since the search is async and we don't want to block emacs during a search.
We get the result from compilation-mode
though so we could add a hook so the user can provide a callback function.
That makes sense. It does feel like making the result available would be useful, but I'm not sure how convenient I'd find a callback function. I'll probably just call rg myself (synchronously).
It would be great if searches returned rg's exit code (0 for matches found, 1 for no matches found, 2 for errors).
In particular I have several searches I've created with
rg-define-search
and I'd like to run them just to know if there was a match or not, I don't need the results buffer to be displayed but I could handle that myself.