bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#64140: 29.0.91; C-u M-x grep doesn't work correctly after M-x vc-git


From: Daniel Martín
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
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (darwin)

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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]