From: "Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 64140@debbugs.gnu.org
Subject: bug#64140: 29.0.91; C-u M-x grep doesn't work correctly after M-x vc-git-grep
Date: Sun, 18 Jun 2023 15:20:45 +0200 [thread overview]
Message-ID: <m1edm8ykia.fsf@yahoo.es> (raw)
In-Reply-To: <83cz1tp7a0.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 18 Jun 2023 10:19:03 +0300")
Eli Zaretskii <eliz@gnu.org> writes:
>> Date: Sun, 18 Jun 2023 02:32:28 +0200
>> From: Daniel Martín via "Bug reports for GNU Emacs,
>> the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
>>
>> Steps to reproduce:
>>
>> emacs -Q
>> C-x C-f emacs/src/xdisp.c RET
>> M-x vc-git-grep RET
>> Perform any search.
>> Place the point over any symbol, for example, char_can_wrap_before.
>> C-u M-x grep
>>
>> The suggested grep command to confirm is
>>
>> git --no-pager char_can_wrap_before *.c
>>
>> which is incorrect, it should be
>>
>> grep --color=auto -nH --null -e char_can_wrap_before *.c
>
> You are saying that vc-git-grep should use a separate history
> variable?
Yes, that's one possible solution, but it's probably too late to change
that. Perhaps there should be a configuration option in the vc package
so users can choose to have a separate history variable for git grep.
grep-default-command already tries to extract different parts of the
command using regular expressions. We could adapt grep-default-command
so that it handles git grep well, but I don't think that'd be a very
clean or future-proof solution.
prev parent reply other threads:[~2023-06-18 13:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <m1pm5t1ug3.fsf.ref@yahoo.es>
2023-06-18 0:32 ` bug#64140: 29.0.91; C-u M-x grep doesn't work correctly after M-x vc-git-grep Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-18 7:19 ` Eli Zaretskii
2023-06-18 13:20 ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
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=m1edm8ykia.fsf@yahoo.es \
--to=bug-gnu-emacs@gnu.org \
--cc=64140@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=mardani29@yahoo.es \
/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).