GNU bug report logs - #68697
Add option to not always use *grep* buffer when executing `grep' or `vc-git-grep' command

Previous Next

Package: emacs;

Reported by: Nafiz Islam <nafiz.islam1001 <at> gmail.com>

Date: Wed, 24 Jan 2024 20:17:02 UTC

Severity: normal

Fix blocked by 68570: 29.1; recompile might not re-use project-compile's buffer

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Nafiz Islam <nafiz.islam1001 <at> gmail.com>
Cc: 68697 <at> debbugs.gnu.org
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 <at> gmail.com>
> Date: Thu, 25 Jan 2024 09:58:10 -0500
> Cc: 68697 <at> 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.




This bug report was last modified 99 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.