Fork me on GitHub
#spacemacs
<
2020-05-13
>
jumar07:05:42

Not long ago I updated my spacemacs develop branch and now I'm getting these errors quite frequently. Is it normal?

jumar07:05:39

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

jumar07:05:26

If often happens when I try to add -t <type> for ex. -t html to restrict the search

jumar07:05:12

Here some more details:

practicalli-john09:05:18

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.

practicalli-john09:05:11

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

practicalli-john09:05:37

rgrep does not have a -t option, so that may explain the error (an assumption).

practicalli-john09:05:20

Does your search binary support the -t option an does Emacs pick up that binary in the path?

practicalli-john09:05:58

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

jumar11:05:40

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....

4
jumar11:05:38

I guess my emacs might be using incorrect binary - how do I find that? (rg does accept the -t in shell)

aisamu13:05:40

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)

aisamu13:05:26

$> rg --version                                                                                                                                                         ripgrep 11.0.2

jumar03:05:23

My version of ripgrep in shell works just fine. It's just the spacemacs that's failing. As soon as I start typing -t<any_char> the debugger error is shown.

practicalli-john13:05:17

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.

aisamu15:05:46

@U05254DQM I think it's -tclojure

aisamu15:05:52

rg --type-list should give you the full list of types and their associated extensions.

practicalli-john16:05:16

@U1UQEM078 Ah, in that case -t works correctly for me with the latest Spacemacs develop branch. I just updated Spacemacs and packages yesterday.

👌 4
jumar07:05:01

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)

aisamu12:05:55

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")

jumar02:05:20

("rg" "--vimgrep" "--no-heading" "--smart-case" "test")

aisamu13:05:31

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)

jumar03:05:34

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...

🎉 4