From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Daniel =?UTF-8?Q?Mart=C3=ADn?= via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs 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 Message-ID: References: <83cz1tp7a0.fsf@gnu.org> Reply-To: Daniel =?UTF-8?Q?Mart=C3=ADn?= Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20071"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (darwin) Cc: 64140@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jun 18 15:21:15 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qAsLD-0004yb-FV for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 18 Jun 2023 15:21:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qAsL2-0003QM-LT; Sun, 18 Jun 2023 09:21:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qAsL0-0003Pp-Qv for bug-gnu-emacs@gnu.org; Sun, 18 Jun 2023 09:21:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qAsL0-0003wC-Hs for bug-gnu-emacs@gnu.org; Sun, 18 Jun 2023 09:21:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qAsL0-0000j2-DO for bug-gnu-emacs@gnu.org; Sun, 18 Jun 2023 09:21:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Daniel =?UTF-8?Q?Mart=C3=ADn?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 18 Jun 2023 13:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64140 X-GNU-PR-Package: emacs Original-Received: via spool by 64140-submit@debbugs.gnu.org id=B64140.16870944592758 (code B ref 64140); Sun, 18 Jun 2023 13:21:02 +0000 Original-Received: (at 64140) by debbugs.gnu.org; 18 Jun 2023 13:20:59 +0000 Original-Received: from localhost ([127.0.0.1]:53516 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAsKx-0000iQ-3B for submit@debbugs.gnu.org; Sun, 18 Jun 2023 09:20:59 -0400 Original-Received: from sonic306-20.consmr.mail.ir2.yahoo.com ([77.238.176.206]:38956) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qAsKu-0000iB-GV for 64140@debbugs.gnu.org; Sun, 18 Jun 2023 09:20:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.es; s=s2048; t=1687094450; bh=OysRfnOpyDrJXcRRuzq4DJZi3cl8wLCiiCTJdSOEHtA=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=BlYmvjOSuDTFS5xi8VcJMH9FVJb7pQW0di65IZlUQKwnLB54YhfH5FSkWsFOKynCzr6O8V1L3UjIuGsPwr+BzR7NhURrJBkjYReM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8KvgP8S8fFBBMe5z1oxYS3KgPJF1p7cP8IYCYy3vOU4gOh nLfYQn9JIsIncFBrwujZb6S4NqI1wUAZkL5D5jf2O6uO66.dzzHUsATXJ2opB8KXgPfE0wwS4TFo dGtZ5nxTgMqy6RfDBdMy4AaCJ6KWnM53erFi0Md_rjE_GrKbRfiXEm40.VEdUIY4Db8cZjc3wz8t pc9JFBHkTpXZdNlEXxYTJwG4KjtKIsOCQAbfJX2igthQKRupLxLnCz_4_I4aYS_P5aUNjly_C_hs ozxXAo90xqVwVi4pFb9MkOSqkpQJityr4ugkgLPRvEDapYvxc_tjf8bb6EADpUboyHzWCegGMXlU q5oNCpUJnNpg9fFB7_z.vrdEOG4ps10M0LGiNbuAwkvPiMlf6jAt1a_lxl.Nf3wj9yjzij0zt8te .VyfGDVGNL6prQVzBINvQVtIJnL07zKq.zk8HLPGajHaftZrD_yEW6S59Ec67dCQLquW8lqFx7Qn dxztOtEjT6POqoddVCixTFHyoNTD41BsFrrNAhjPE3 X-Sonic-MF: X-Sonic-ID: 9d8f87f9-3a45-4b82-b335-f0c421162b26 Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.ir2.yahoo.com with HTTP; Sun, 18 Jun 2023 13:20:50 +0000 Original-Received: by hermes--production-ir2-7867f454fc-kqstn (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID e5da8e9004d0c6ac6c12b436d21cc7ab; Sun, 18 Jun 2023 13:20:46 +0000 (UTC) In-Reply-To: <83cz1tp7a0.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 18 Jun 2023 10:19:03 +0300") X-Mailer: WebService/1.1.21557 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:263630 Archived-At: Eli Zaretskii writes: >> Date: Sun, 18 Jun 2023 02:32:28 +0200 >> From: Daniel Mart=C3=ADn via "Bug reports for GNU Emacs, >> the Swiss army knife of text editors" >>=20 >> Steps to reproduce: >>=20 >> 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 >>=20 >> The suggested grep command to confirm is >>=20 >> git --no-pager char_can_wrap_before *.c >>=20 >> which is incorrect, it should be >>=20 >> grep --color=3Dauto -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.