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

From: Sean Whitton <[email-masked]>
Date: Sun, 16 Mar 2025 11:36:40 +0800

Hello,

On Sat 15 Mar 2025 at 12:49pm +02, Eli Zaretskii wrote:

>> From: Sean Whitton <[email-masked]>
>> Cc: [email-masked],  [email-masked]
>> Date: Sat, 15 Mar 2025 15:32:22 +0800
>>
>> Hello,
>>
>> On Fri 14 Mar 2025 at 10:42am +02, Eli Zaretskii wrote:
>>
>> > That could be okay, but is not the most useful way of using Grep
>> > history in git grep commands.  A more useful way would be to allow the
>> > user to reuse Grep history in git grep commands by modifying them to
>> > become valid command lines.  Because I think it would be extremely
>> > useful to be able to run a "git grep" command that searches for the
>> > same pattern as a previous Grep command, and vice versa.
>>
>> Yes, you're right, that would be very useful.
>>
>> I guess that we should say that grep owns the history variable, so
>> vc-git-grep should be responsible for performing the transformations in
>> either direction, when using the history variable for prompting, and
>> when saving to it?
>
> Yes, something like that.

Thanks, I'll look into implementing this at some point, if someone else
doesn't get there first.

-- 
Sean Whitton