Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Candidates function `helm-rg--make-process' should run a process #17

Open
NoahDragon opened this issue Jul 9, 2019 · 19 comments
Open

Comments

@NoahDragon
Copy link

I got the issue while running emacs on windows. Recently change ag to rg, but got this message while using M-x "helm-projectile-rg" under a project file. Does anyone happen know the cause?

@yeliu84
Copy link

yeliu84 commented Jul 24, 2019

@NoahDragon I have this issue when my working directory isn't the project root, if I use M-d to search from project root, this error message goes away.

If your symptom is the same, the issue is from helm-projectile, and there is an issue opened for it. In the mean time, you can try to set helm-rg-default-directory to 'git-root as a workaround.

@willnevillain
Copy link

Using the workaround suggested by @jaux I'm able to get into a *helm-rg* process buffer using helm-projectile-rg regardless of working directory.

However, I'm still running into this issue when trying to actually search anything in the process buffer; when typing the required 2 chars I start getting blasted with the following error:

Error running timer: (error "Candidates function `helm-rg--make-process` should run a process")

Config:

(use-package helm-rg
  :config (setq helm-rg-default-directory 'git-root))

(use-package helm-projectile)

Gif:
Screen Recording 2019-10-16 at 1 21 01 PM

@RenWenshan
Copy link

I get this error after using use-package, haven't figured out why.

@kuba-orlik
Copy link

I started seeing this error right after I reinstalled my system

@kuba-orlik
Copy link

After further investigation it turns out I had the helm-rg-ripgrep-executable variable set to '/usr/bin/rg instead of /usr/bin/rg 🤦‍♂️

@iburunat
Copy link

@kuba-orlik I had this issue too after customizing the path in helm-rg-ripgrep-variable. Now it's back to "normal" :).

@rileyrg
Copy link

rileyrg commented Aug 1, 2020

helm-rg-ripgrep-variable.

There is no such variable. If you meant: helm-rg-ripgrep-executable it still doesn't work for me. The problem is that it doesn't work if there is no .git in the hierarchy. This should not be the case.

@iburunat
Copy link

iburunat commented Aug 1, 2020

helm-rg-ripgrep-variable.

There is no such variable. If you meant: helm-rg-ripgrep-executable it still doesn't work for me. The problem is that it doesn't work if there is no .git in the hierarchy. This should not be the case.

Yes, you are right. I misspelled the variable name.
I understand for you it works only if it's a git folder.

@rileyrg
Copy link

rileyrg commented Aug 1, 2020 via email

@iburunat
Copy link

iburunat commented Aug 2, 2020

Does it work for you if no .git directory?

On Sat, 1 Aug 2020, 16:08 ibichka @.***> wrote: helm-rg-ripgrep-variable. There is no such variable. If you meant: helm-rg-ripgrep-executable it still doesn't work for me. The problem is that it doesn't work if there is no .git in the hierarchy. This should not be the case. Yes, you are right. I misspelled the variable name. I understand for you it works only if it's a git folder. — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#17 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACYTCZVXT5C2JFBIWNCDFLR6QOUBANCNFSM4H7BAYVA .

Yes, it does.

@rileyrg
Copy link

rileyrg commented Aug 2, 2020 via email

@iburunat
Copy link

iburunat commented Aug 2, 2020

Thanks for your reply! You're sure there's no git repo in a parent? I have all latest melpa updates. I don't think I'm doing anything untoward : my-projectile-grep https://github.com/rileyrg/Emacs-Customisations/blob/master/config.org#projectile

Yes, I am very, very sure. There is no GIT repo in the folder where I call M-x helm-projectile-rg.
Very. Very. Sure.

@rileyrg
Copy link

rileyrg commented Aug 2, 2020 via email

@iburunat
Copy link

iburunat commented Aug 2, 2020

Not in the children, not in the parent, not in the grandparent. :)

@TLATER
Copy link

TLATER commented May 10, 2021

Note that this message also appears when rg cannot be found, so there's a good chance at least some of these comments come from a misconfiguration - check if you can run rg with M-x eshell.

Maybe a more readable error message when the rg binary isn't in the path would be handy :)

@leejh903
Copy link

leejh903 commented Jan 7, 2022

In my case, I did not installed rg. So I installed rg using command sudo apt install ripgrep and I solved it

@asmodeus812
Copy link

asmodeus812 commented Jan 11, 2022

Same issue here with helm enabled when i hit SPC s p to do a project wide search nothing happens i get the same error - helm-get-candidates: Candidates function ‘helm-rg--make-process’ should run a process. I am on windows i have rg installed and env path poining to it. I can access it from cmd or eshell by simply typing rg

Note that the helm rg executable variable points to "c:/ProgramData/chocolatey/bin/rg.exe"
But i have not installed rg with choco. This directory does contain an rg exe which when started does open rg indeed. But the rg i installed i put in program files and that is where the env path variable points to.

@garvinguan
Copy link

@willnevillain Not sure if this fixes your issue but I ran into the same thing when I had set helm-rg-ripgrep-executable like so

(setq helm-rg-ripgrep-executable '/usr/local/bin/rg)

setting helm-rg-ripgrep-executable like this fixed the issue for me

(setq helm-rg-ripgrep-executable "/usr/local/bin/rg")

@arichiardi
Copy link

arichiardi commented Oct 3, 2024

I also use use-package and in my case I noticed the helm-rg code is evaluated at a moment when the PATH has not yet been set (via exec-path-from-shell) and that results in an empty helm-rg-ripgrep-executable.

Just wanted to highlight that on some systems you need to make sure the exec-path is set correctly before helm-rg defines its defcustom.

One tweak worth considering to helm-rg is to run (and store) (executable-find "rg") when the command is launched the first time...

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests