From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#36644: Git log search Date: Thu, 25 Jul 2019 16:08:37 +0300 Message-ID: <83h87antwq.fsf@gnu.org> References: <874l3p4lks.fsf@mail.linkov.net> <87blxvj5lv.fsf@mail.linkov.net> <23ad9090-ebfc-4307-b41f-30f7c310d978@yandex.ru> <87tvbliw37.fsf@mail.linkov.net> <1251461563472968@myt6-1dca55ddeee8.qloud-c.yandex.net> <87lfwvrpur.fsf@mail.linkov.net> <62a4fa22-d4f5-5cd4-69b7-7ae1c70e68bc@yandex.ru> <46b910fb-25f0-1b6e-df9b-fda1383cb1c9@yandex.ru> <83v9vro1fy.fsf@gnu.org> <3126d32c-fbe5-771e-c89f-d3e898e811c8@yandex.ru> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="14649"; mail-complaints-to="usenet@blaine.gmane.org" Cc: rpluim@gmail.com, 36644@debbugs.gnu.org, juri@linkov.net To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jul 25 15:09:15 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hqdUf-0003dM-SP for geb-bug-gnu-emacs@m.gmane.org; Thu, 25 Jul 2019 15:09:13 +0200 Original-Received: from localhost ([::1]:60026 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hqdUd-00006h-B5 for geb-bug-gnu-emacs@m.gmane.org; Thu, 25 Jul 2019 09:09:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44426) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hqdUa-00005r-LC for bug-gnu-emacs@gnu.org; Thu, 25 Jul 2019 09:09:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hqdUV-0006NE-NQ for bug-gnu-emacs@gnu.org; Thu, 25 Jul 2019 09:09:08 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57972) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hqdUV-0006N4-IJ for bug-gnu-emacs@gnu.org; Thu, 25 Jul 2019 09:09:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hqdUU-0003ev-AV for bug-gnu-emacs@gnu.org; Thu, 25 Jul 2019 09:09:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 25 Jul 2019 13:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36644 X-GNU-PR-Package: emacs Original-Received: via spool by 36644-submit@debbugs.gnu.org id=B36644.156406013414050 (code B ref 36644); Thu, 25 Jul 2019 13:09:02 +0000 Original-Received: (at 36644) by debbugs.gnu.org; 25 Jul 2019 13:08:54 +0000 Original-Received: from localhost ([127.0.0.1]:38560 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hqdUM-0003eX-8D for submit@debbugs.gnu.org; Thu, 25 Jul 2019 09:08:54 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:60150) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hqdUJ-0003eK-Sq for 36644@debbugs.gnu.org; Thu, 25 Jul 2019 09:08:52 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:43590) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hqdUD-0006IS-Ot; Thu, 25 Jul 2019 09:08:45 -0400 Original-Received: from [176.228.60.248] (port=1305 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hqdUD-0005TP-4K; Thu, 25 Jul 2019 09:08:45 -0400 In-reply-to: <3126d32c-fbe5-771e-c89f-d3e898e811c8@yandex.ru> (message from Dmitry Gutov on Thu, 25 Jul 2019 15:36:54 +0300) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:163706 Archived-At: > Cc: rpluim@gmail.com, 36644@debbugs.gnu.org, juri@linkov.net > From: Dmitry Gutov > Date: Thu, 25 Jul 2019 15:36:54 +0300 > > > I also see your point: it would be nice to be able to document the > > semantics of PATTERN in a backend-independent way. But I think this > > is next to impossible in this case, both because of significant > > differences in the backend capabilities (e.g., bzr doesn't have the > > equivalent of Git's --fixed-strings, AFAICT), and because some backend > > allow great flexibility in interpreting PATTERN, under control of > > optional switches passed to the backend. > > The other option is to standardize on basic or extended regexp, and > simply give up for backends that can't support that. We could simply say "regular expression" and leave the details unspecified. But I think Juri said that fixed strings was the lowest common denominator, which is why I proposed a slightly more vague doc string. Juri, which backends don't support regular expressions? And Robert, why did you insist on saying STRING? > Git supports all kinds of regexps. 'hg grep' uses Perl-compatible ones > (meaning extended regexps are supported, at least). I'm not sure which > regular expressions are expected by 'bzr log -match', but if it doesn't > support the extended ones, *shrug*. I didn't dig deep enough, but since bzr is written in Python, I'd bet it supports whatever Python supports natively. > Anyway, if people disagree, I'm not going to press the issue. If all the backends either support regular expressions or don't support this feature at all, then we had better mentioned regular expressions in the doc string. > > So I think we should treat this as we do in "M-x grep": leave the > > semantics of PATTERN backend-dependent, and rely on the user to quote > > some characters in it as needed. Admittedly, 'grep' is lower-level > > than 'vc-log-search', but at least we have a precedent. > > The difference is, 'M-x grep' doesn't use different backends. It actually leaves that to the user: you can invoke any program you want. E.g., I invoke 'fgrep' this way very frequently.