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: Wed, 24 Jul 2019 19:13:37 +0300 Message-ID: <83v9vro1fy.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> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="25606"; 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 Wed Jul 24 18:14:09 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 1hqJu4-0006Xb-Pg for geb-bug-gnu-emacs@m.gmane.org; Wed, 24 Jul 2019 18:14:08 +0200 Original-Received: from localhost ([::1]:53100 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hqJu3-0004F1-Ev for geb-bug-gnu-emacs@m.gmane.org; Wed, 24 Jul 2019 12:14:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59187) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hqJtz-00044V-Ib for bug-gnu-emacs@gnu.org; Wed, 24 Jul 2019 12:14:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hqJty-00018Y-9v for bug-gnu-emacs@gnu.org; Wed, 24 Jul 2019 12:14:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57324) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hqJty-00017r-5Q for bug-gnu-emacs@gnu.org; Wed, 24 Jul 2019 12:14:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hqJtx-0001er-V4 for bug-gnu-emacs@gnu.org; Wed, 24 Jul 2019 12:14:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 24 Jul 2019 16:14:01 +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.15639848356342 (code B ref 36644); Wed, 24 Jul 2019 16:14:01 +0000 Original-Received: (at 36644) by debbugs.gnu.org; 24 Jul 2019 16:13:55 +0000 Original-Received: from localhost ([127.0.0.1]:37909 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hqJtr-0001eD-9Q for submit@debbugs.gnu.org; Wed, 24 Jul 2019 12:13:55 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:46704) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hqJtp-0001dw-KC for 36644@debbugs.gnu.org; Wed, 24 Jul 2019 12:13:54 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:54080) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hqJtk-0000rY-4m; Wed, 24 Jul 2019 12:13:48 -0400 Original-Received: from [176.228.60.248] (port=4651 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hqJtj-0007b3-FR; Wed, 24 Jul 2019 12:13:47 -0400 In-reply-to: <46b910fb-25f0-1b6e-df9b-fda1383cb1c9@yandex.ru> (message from Dmitry Gutov on Wed, 24 Jul 2019 18:53:01 +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:163671 Archived-At: > Cc: "36644@debbugs.gnu.org" <36644@debbugs.gnu.org>, > Juri Linkov , Eli Zaretskii > From: Dmitry Gutov > Date: Wed, 24 Jul 2019 18:53:01 +0300 > > > Itʼs not a pattern. Itʼs a string that is passed as-is to the backend, > > which is free to interpret it as it wishes. From my viewpoint, we can > > just say > > > > "Search for STRING, which is passed unsullied to the backend's log > > search command. Consult the documentation for your backend to > > understand the matching method it uses to search for STRING." > > IME this doesn't match the way we try to document commands in Emacs, but > I wouldn't want to spend much time arguing about this. > > Eli, could you weigh in in this discussion? Would you say Robert's > proposal is acceptable? Yes, I think on balance it's acceptable. 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 only way to make this backend-independent is to do the search in Emacs Lisp, which I think will slow down the command too much. 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. Note that I still think we should use PATTERN, not STRING in the doc string, because a literal string here is more an exception than a rule. But we should say that the exact semantics of PATTERN is backend-dependent, and perhaps describe how a couple of the more popular backends interpret it.