[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#68697: Add option to not always use *grep* buffer when executing `gr
From: |
Eli Zaretskii |
Subject: |
bug#68697: Add option to not always use *grep* buffer when executing `grep' or `vc-git-grep' command |
Date: |
Thu, 25 Jan 2024 17:12:11 +0200 |
> From: Nafiz Islam <nafiz.islam1001@gmail.com>
> Date: Thu, 25 Jan 2024 09:58:10 -0500
> Cc: 68697@debbugs.gnu.org
>
> Oh right, I can use compilation-buffer-name-function. My only issue is that
> it doesn't have enough
> context to generate a meaningful buffer name; it only takes a name-of-mode. A
> meaningful buffer
> name could consist of the regexp or the entire grep shell command.
You could include in the buffer name the default-directory instead.
Alternatively, you could advise "M-x grep" or write a wrapper around
it, and in that advice/wrapper bind some dynamic variable to the grep
command, and your compilation-buffer-name-function could then access
that variable.