helm-projectile
helm-projectile copied to clipboard
helm-projectile-grep not finding project root
Expected behavior
When inside a git repo, running helm-projectile-grep shouldn't ask me for a starting directory.
projectile-grep (the non-helm flavor) works as expected.
Possibly an unintended side effect of this commit?
Actual behavior
The command asks me for a starting directory and then only finds results under that directory.
Steps to reproduce the problem
- open a file deep in a git repo
- run M-x helm-projectile-grep (Previously, this would start a project-wide search based on the word my cursor is on.)
- it asks for a starting directory.
Backtraces if necessary (M-x toggle-debug-on-error
)
There's no error. This is how projectile and helm-projectile are configured for me:
(use-package projectile
:demand
:diminish projectile-mode
:init
(use-package helm-projectile
:config
(helm-projectile-on)
:bind (("C-c p p" . helm-projectile-switch-project)))
(setq projectile-use-git-grep t)
:config
(projectile-mode t)
(setq projectile-completion-system 'helm)
(setq projectile-switch-project-action 'projectile-find-file)
(add-to-list 'projectile-globally-ignored-directories "node-modules")
(add-to-list 'projectile-globally-ignored-files "node-modules")
:bind (("s-f" . projectile-find-file)
("s-F" . projectile-grep)))
Environment & version information
-
helm-projectile
version: master (I'm using straight.el) -
helm
version (inhelm-pkg.el
): 3.6.2 -
projectile
version (M-x projectile-version
): 2.2.0snapshot - Emacs version (
M-x emacs-version
): GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.18, cairo version 1.16.0) of 2020-05-18 - OS: Ubuntu 20.04 LTS
I found it. It's the addition of "D" in interactive in helm-projectile-grep and helm-projectile-ack. I'll submit a patch?
https://github.com/bbatsov/helm-projectile/pull/140
The problematic commit was reverted. I didn't pay much attention to it. Sorry about that!