0

Projectile-grep, projectile-ag et al always execute the search in the current file's project.

What I want to do is to select the project from a completion list and get projectile to search that project instead of having to open a file in the project directory and running the search from there.

Does emacs or projectile itself have some way of doing that? The only way I can think of for now is to get the completion dialog to open a buffer onto a file from that project and run the projectile-grep command after that. That seems clumsy some how.

vfclists
  • 1,347
  • 1
  • 11
  • 28

1 Answers1

1

s-p p (where s-p represents whatever prefix key you have chosen) will allow you to choose a different project. It then prompts you to open a file from that project; you can just open whatever file is first in the list for speed. Then do the search.

https://docs.projectile.mx/projectile/configuration.html#switching-projects

db48x
  • 15,741
  • 1
  • 19
  • 23
  • I don't know how I've missed this for so long. Do the other project search systems to something similar? – vfclists Jun 22 '21 at 01:17
  • 1
    Easy enough to miss one command in the midst of all the others. I only use Projectile, so I can’t compare it to alternatives. – db48x Jun 22 '21 at 03:25