helm-ag
helm-ag copied to clipboard
Error: stat()ing: foo. Error opening directory foo: No such file or directory
I need a function to search in filenames and retrieve those filenames containing the string I search for.
For some reason, this piece of code is not working for this purpose:
(defun helm-do-ag-projects ()
"Grep string in Project directory" (interactive)
(let ((rootdir (concat "~/my_projects/")))
(let ((helm-ag-command-option (concat helm-ag-command-option "--all-text -g")))
(helm-do-ag rootdir))))
Getting the error:
ERR: Error: stat()ing: foo.
ERR: Error opening directory foo: No such file or directory
I use helm-projectile
for that – not sure if that'd do what you need?
Thanks. Could I set up the project directory to any directory in my function?
There is probably a way to set the project directory manually yes, although i believe by default projectile looks for a VCS root, so if you're using Git or another version control system i believe it'll do "the right thing" by default. My memory is hazy though because it's a long time ago i set it up for myself. On 9 Mar 2023, at 16:32, Adelle Bernal @.***> wrote: Thanks. Could I set up the project directory to any directory in my function?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>