Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

helm-projectile-grep not finding project root #139

Open
eamonnsullivan opened this issue May 19, 2020 · 3 comments
Open

helm-projectile-grep not finding project root #139

eamonnsullivan opened this issue May 19, 2020 · 3 comments

Comments

@eamonnsullivan
Copy link

eamonnsullivan commented May 19, 2020

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

  1. open a file deep in a git repo
  2. run M-x helm-projectile-grep
    (Previously, this would start a project-wide search based on the word my cursor is on.)
  3. 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 (in helm-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
@eamonnsullivan
Copy link
Author

I found it. It's the addition of "D" in interactive in helm-projectile-grep and helm-projectile-ack. I'll submit a patch?

@eamonnsullivan
Copy link
Author

#140

@bbatsov
Copy link
Owner

bbatsov commented May 20, 2020

The problematic commit was reverted. I didn't pay much attention to it. Sorry about that!

laurynas-biveinis added a commit to laurynas-biveinis/dotfiles that referenced this issue May 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants