deadgrep
deadgrep copied to clipboard
Context awareness doesn't seem to work
Hi! In your readme, you write that if I'm in a git project, this will be used for the directory (instead of the current file's directory). This doesn't seem to work, however. What could be wrong?
What happens? What's the output of M-x deadgrep?
@Wilfred Sorry for the late answer. The output is fine, except the directory is the directory of the current file, not the project (e.g. git) root.
What's the output for M-x deadgrep-debug? (Woops, that's what I meant to write in my last comment.)
Ah, I see. The output is (in subdir):
About your environment:
Platform: gnu/linux
Emacs version: 26.1
Command: nil
default-directory: "/home/philipp/project/subdir"
Initial output from ripgrep:
nil
Unless you've changed the value of deadgrep-project-root-function, you'll be using deadgrep--project-root. This calls (project-current), an Emacs built-in function that has presumably decided that subdir is the project root.
If so, project-find-functions is returning the subdirectory. Do you have any version control things in there? The default value for project-find-functions is project-try-vc.