From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#36644: Git log search Date: Wed, 24 Jul 2019 18:53:01 +0300 Message-ID: <46b910fb-25f0-1b6e-df9b-fda1383cb1c9@yandex.ru> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="208877"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 Cc: "36644@debbugs.gnu.org" <36644@debbugs.gnu.org>, Juri Linkov To: Robert Pluim Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 24 17:54:13 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 1hqJai-000s4c-Lv for geb-bug-gnu-emacs@m.gmane.org; Wed, 24 Jul 2019 17:54:08 +0200 Original-Received: from localhost ([::1]:52738 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hqJah-0007vt-06 for geb-bug-gnu-emacs@m.gmane.org; Wed, 24 Jul 2019 11:54:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53245) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hqJad-0007vI-8m for bug-gnu-emacs@gnu.org; Wed, 24 Jul 2019 11:54:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hqJac-0006KM-4B for bug-gnu-emacs@gnu.org; Wed, 24 Jul 2019 11:54:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57312) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hqJac-0006KC-0P for bug-gnu-emacs@gnu.org; Wed, 24 Jul 2019 11:54:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hqJab-00017R-TR for bug-gnu-emacs@gnu.org; Wed, 24 Jul 2019 11:54:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 24 Jul 2019 15:54: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.15639835914217 (code B ref 36644); Wed, 24 Jul 2019 15:54:01 +0000 Original-Received: (at 36644) by debbugs.gnu.org; 24 Jul 2019 15:53:11 +0000 Original-Received: from localhost ([127.0.0.1]:37900 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hqJZm-00015x-WE for submit@debbugs.gnu.org; Wed, 24 Jul 2019 11:53:11 -0400 Original-Received: from mail-wr1-f47.google.com ([209.85.221.47]:39905) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hqJZm-00015j-0X for 36644@debbugs.gnu.org; Wed, 24 Jul 2019 11:53:10 -0400 Original-Received: by mail-wr1-f47.google.com with SMTP id x4so47512381wrt.6 for <36644@debbugs.gnu.org>; Wed, 24 Jul 2019 08:53:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=uTihQN2zpYQVNMM8pywnF+oXA+lkvmUHPNiaMhpsPw8=; b=TurY8k6ALPL8iM8i5ezvUgoaJ/hXh1LCLtK+CKHnQ6Pe08SFRo+XuQsE3zdn6+sRRh 3/FfDrGdB8v+K5t3NNwDP2qknJV/RK+GdvdjwE+yJQWZ6K3zra73tX8R0KvS/XpMVksy 6z9zh6nJ1T4oMXqJwEd8ZIX+T8Um67xW75CDKDJFuQGi6nkgvtXZu0E4OePvJBUnkedK /RiSSnJygW9k40WbJM3q291HhBdj0rLYPcyYTY3AAJyA2cbC+FsLhcZ+Xz6ewohdXpZx jx6exi8/lLWeqCN//xYPlFOct143jRtiVqucBH49Vv3uCpZufYoPZeZAvqCHmrAHxlN6 P4CA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=uTihQN2zpYQVNMM8pywnF+oXA+lkvmUHPNiaMhpsPw8=; b=myKB7OwhAg2q92J1daxcD0FY+1VQX7fDN1HiTkzYjyNQTowDmR4X1jl0jy06kODX6H /DcFkb00dyqye9vQPx34QQ0hj+zprxel70NL9ItSLytygKbC0AwGFEtPgOdpi6iZqVaw i6zYeDCdlF4IW6wf5sMqLSUP6iXvNjloQenqA5h+T0OyAbrgSveKHaZxbh6oU2wTFZ7U 2nXPPD10U4wrLdWI/EJHrJuzLOEpcBHYOnfA8DoZP7uVLhMNN8PPxb57yz2cO9T2QqaD IUOZnASWRXo6iljgaY0r35wMvoknWGIQG+5KiXGFc+07oUL0M94TD4wtxMx/D1OC0IGc 4ERg== X-Gm-Message-State: APjAAAXS9l1yS4eiXXQPr20UB+bjVT1jRJ/zjETfBEntCpZ8uCMoYPrr 1G9vBdotfFlQDLpJoemD7r8= X-Google-Smtp-Source: APXvYqzbAvXcU0MRxmD19ofCyuEIo43/UUNsVWzYQEvb2WUV5+H2i+hF5lJAnCUm69DS+i1n2IyWmg== X-Received: by 2002:adf:afe2:: with SMTP id y34mr86552882wrd.250.1563983583981; Wed, 24 Jul 2019 08:53:03 -0700 (PDT) Original-Received: from [192.168.0.195] ([109.110.245.170]) by smtp.googlemail.com with ESMTPSA id x24sm45247167wmh.5.2019.07.24.08.53.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Jul 2019 08:53:03 -0700 (PDT) In-Reply-To: Content-Language: en-US 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:163670 Archived-At: On 24.07.2019 18:46, Robert Pluim wrote: >>>>>> On Wed, 24 Jul 2019 18:10:35 +0300, Dmitry Gutov said: > > Dmitry> On 19.07.2019 1:32, Juri Linkov wrote: > >>> We can't really use this approach. VC is a high level abstraction, > >>> so we try to define the semantics well. > >> > >> I tend to agree with Robert. A string have to be passed to the backend as is. > >> It seems such situations when these strings should be compatible between > >> different backends (such as running the same command on one backend, > >> and then repeating the same search on another backend by retrieving > >> a previous argument from the history via M-p) are very rare. > > Dmitry> I might agree with you from the practical standpoint, but > Dmitry> vc-log-search needs a docstring that actually describes what the > Dmitry> function is going to do. Including info on how PATTERN is going to be > Dmitry> interpreted. > > If it were implemented as 'backend show me all the logs and then emacs > will search through them' then that would be required, but itʼs not, > itʼs implemented as 'backend show me the logs which match STRING' Again, it's about documentation and about commands doing things in a way that the user can anticipate. > Dmitry> E.g. whether "foo.txt" will only match literally, or whether "." can > Dmitry> be substituted by any character. > > That will depend on the backend > > Dmitry> And if PATTERN is a regexp, what kind of regexp it's going to be > Dmitry> interepreted as: basic RE, extended RE, Emacs RE, or Perl RE (probably > Dmitry> not the last one anyway). > > As will this > > Dmitry> I suppose we can choose one of these and say e.g. that pattern is > Dmitry> interpreted as an extended regular expression, except for some > Dmitry> backends that don't support that. I wonder how we're going to convey > Dmitry> the latter to the user. > > 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?