unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Nafiz Islam <nafiz.islam1001@gmail.com>
Cc: 68697@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	[thread overview]
Message-ID: <86a5otcur8.fsf@gnu.org> (raw)
In-Reply-To: <CAKjtFcRL7V1sL8AJBLp3D9Lv6+xEfx02s82oV8_sofffT75HuQ@mail.gmail.com> (message from Nafiz Islam on Thu, 25 Jan 2024 09:58:10 -0500)

> 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.





  reply	other threads:[~2024-01-25 15:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-24 20:16 bug#68697: Add option to not always use *grep* buffer when executing `grep' or `vc-git-grep' command Nafiz Islam
2024-01-25  7:24 ` Eli Zaretskii
2024-01-25 14:58   ` Nafiz Islam
2024-01-25 15:12     ` Eli Zaretskii [this message]
2024-01-25  7:45 ` Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86a5otcur8.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=68697@debbugs.gnu.org \
    --cc=nafiz.islam1001@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).