[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How best to set grep command based on current directory?
From: |
Eli Zaretskii |
Subject: |
Re: How best to set grep command based on current directory? |
Date: |
Sat, 09 Apr 2022 09:10:32 +0300 |
> From: Michael Welsh Duggan <mwd@md5i.com>
> Date: Fri, 08 Apr 2022 21:10:19 -0400
>
> I would like to change the program invocation in "M-x grep" (or maybe
> "M-x grep-find") to default to "git grep" when in directories that are
> in git trees. I could hack away at the grep.el sources to do this, or I
> could write some advice around the grep command to do this, but I want
> to ask here, first, if anyone believes that there is a more principled
> way to make this change.
That must be an opt-in behavior, to avoid surprising the users.
"M-x grep" is a very old command, so I don't think we can change
its behavior in such radical ways unconditionally.