From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Wolfgang Scherer Newsgroups: gmane.emacs.bugs Subject: bug#37189: 25.4.1: vc-hg-ignore implementation is missing Date: Sun, 9 Feb 2020 14:57:12 +0100 Message-ID: References: <1ba53ae2-42a4-3ab3-d4f2-2ceae565d198@gmx.de> <52917e6f-2f00-25cf-4353-dfb40287d0ea@gmx.de> <83pnkrdpb3.fsf@gnu.org> <679942e8-abe9-b0fc-720d-75a54d8d0b5a@gmx.de> <95da41e8-7a55-a15c-cfa7-d70366f9ee6b@gmx.de> <412195c1-e196-12af-933b-0312f5075847@yandex.ru> <57825d73-27a4-d5f5-8198-a172796a558a@gmx.de> <1ebc6077-9175-65ba-4996-282bb2c8eca5@yandex.ru> <6145d6f6-37a8-7166-731b-57669086b145@gmx.de> <838slmk90j.fsf@gnu.org> <83h806gp2w.fsf@gnu.org> <8336bmg1o9.fsf@gnu.org> <2354821b-5c1e-f9e3-3a64-4ff978ded33b@gmx.de> <83sgjkdev5.fsf@gnu.org> <3fb73dbc-bf31-233b-4afc-2147c4ffd5b7@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="94810"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1 Cc: 37189@debbugs.gnu.org, dgutov@yandex.ru To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Feb 09 14:58:35 2020 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 1j0n6Z-000OZ6-00 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 09 Feb 2020 14:58:35 +0100 Original-Received: from localhost ([::1]:50572 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j0n6X-0000F5-SE for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 09 Feb 2020 08:58:34 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59408) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j0n64-0000EA-1o for bug-gnu-emacs@gnu.org; Sun, 09 Feb 2020 08:58:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j0n62-0001Wz-O2 for bug-gnu-emacs@gnu.org; Sun, 09 Feb 2020 08:58:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46230) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j0n62-0001Wt-LX for bug-gnu-emacs@gnu.org; Sun, 09 Feb 2020 08:58:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j0n62-0003IB-LZ for bug-gnu-emacs@gnu.org; Sun, 09 Feb 2020 08:58:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Wolfgang Scherer Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 09 Feb 2020 13:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37189 X-GNU-PR-Package: emacs Original-Received: via spool by 37189-submit@debbugs.gnu.org id=B37189.158125664512592 (code B ref 37189); Sun, 09 Feb 2020 13:58:02 +0000 Original-Received: (at 37189) by debbugs.gnu.org; 9 Feb 2020 13:57:25 +0000 Original-Received: from localhost ([127.0.0.1]:52200 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j0n5Q-0003Gv-Jo for submit@debbugs.gnu.org; Sun, 09 Feb 2020 08:57:24 -0500 Original-Received: from mout.gmx.net ([212.227.17.22]:53917) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j0n5N-0003GP-7h for 37189@debbugs.gnu.org; Sun, 09 Feb 2020 08:57:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1581256634; bh=IoPR5l19VCoDcEEBsHG5g4aONi+ORYr+RaWsDdeSmk4=; h=X-UI-Sender-Class:Subject:From:To:Cc:References:Date:In-Reply-To; b=Da0IlJziBDt9idLTqUcAvThZCuLl1ICzyimfgsDhfSmt4mSjNS7ZY2OicaVtD3HD2 LQZ4y3DAVLWXaoFezrHQr6YnhS5YKuHHSk2H5/zcjon1y4MMbEdJXi1NSDsnSHCq3l 8tFuHrjWLDXJJwuXSd4ofIyb7w+9y9pkWEdOb68Q= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from sheckley.simul.de ([87.160.210.52]) by mail.gmx.com (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MVNB1-1iu0nV2gBb-00SRLr; Sun, 09 Feb 2020 14:57:14 +0100 Original-Received: from [127.0.0.1] (sheckley.simul.de [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by sheckley.simul.de (Postfix) with ESMTPSA id 881A119431CE; Sun, 9 Feb 2020 14:57:13 +0100 (CET) Openpgp: preference=signencrypt Autocrypt: addr=Wolfgang.Scherer@gmx.de; prefer-encrypt=mutual; keydata= xsDiBEb46IgRBACMHOAb1KNo1Ylk+ebri+4R+bG4tyKlqBlrpv8D9/ZwRdXSGt+0DyCHoaAd 7KW7noHapLe87DunABOjKG4nqTGv+dRiWuUBlp3I4aYRFDVa3Da+XnIYkMHKqhK59VEHQCdp Km42nuLS7TS+n99at9YwzTG6VBdOlBKTlRFngOjVLwCg1RGXJ6X3EjS1FKCQeXziURVpWlkD /2zY6Ayhxi62TS84VjikXrrmjXykAAaAmMVEyKKYb9L5pGlqiZz9g/K9xw1EUoZTYuaufquD v4rAGR58K/3V4CYfJLEeshMWiaXHvMmlxMznlG16/um4MvmR8B3r+cx0nOPK1JBdD2qrkNnF Mw8FB+zouLFB4Gt2IUC5IlOmZ8OQA/4qdU53CItzWsCr9Nux4L0qUlRweSmCnV8xGQ2wP5XI MawIQxxREvSrsYDG8cNnYETMg4iQFfIktwAoxCJvuFAwIB6ZxHGF4FcEZm64CXc2u7CmFLqt rVhXhIfMz9oEYC+HhGczGamn9ofbGTFd2hJEtPcQgWNR4f7+aKknmi2+OM0fV29sZmdhbmcg U2NoZXJlciA8d3NAc3ctYW10LndzPsJhBBMRAgAhBQJYmz3YAhsjBQsJCAcCBhUICQoLAgQW AgMBAh4BAheAAAoJEIUCr3Gr112VZZoAoLTBSTp1qGuNhLdXY04iaWCMYmHCAJ4kHPtQ6nTw kEq9qCHgVgXDaY7wjs7ATQRG+OiIEAQAhi0wjcxvA4tychg2NQuwBIf9LX/46l+74+QbewCn a4a+mw/9s5KY In-Reply-To: <3fb73dbc-bf31-233b-4afc-2147c4ffd5b7@gmx.de> Content-Language: de-DE X-Provags-ID: V03:K1:zhCvjKhtZ/x0gZe82OpHFdLkwARWpiPJnlZOv19pDT1w8Kt3lpt 9ipMSwNOyXUC7quqBD/TDIQOEGi10q2J83zLQP0XSftr2oTMy+sh/VH3WImG2CgAEVxR25T 2NgeveqGR9PLLQ0fMObnQ7mBYbI3bpqWLe0H3x2DE+MAmNHCmwWrO9EHvJV4Vjziam+r3W4 LBeIAfVuaYhruoy6sVaFA== X-UI-Out-Filterresults: notjunk:1;V03:K0:FpLkACZkHwo=:ch68Qv+n164HFdKa7ZWHza o0SG+hpWMh1gIYsA0VYdraZb4+3F9oOaQ4VKlgI5Q6AKQGcCIxLU2a6tu/ZS7gjja9mgdYbQW lUcqho+smbLeMl+X7NiZs3zGk8i0AiabPZnXLZrh5AoYwidlsdzzOcXFNr+wZrIJm7QJ6VDHy gbGd6R1yo10b/vIPzgN8sApwAvKoEBPdhTrZSGCpjA/rHXj2olYwzvfh95SC75R0s72z7jC3t xsJrAAGqpc4XXyVJlv5l9c1Z83E6dziLQu75iWSewpxPPRtt+fQ0Rq4F99ictfb+bSfvKr6Ob TQbRYsTbRzWIsVBendwbNPn8A/rP6AE7dhar+fc4JcGReMNXsRiG88jbnksiK1rR17mic5Gpm lGfFXdhUnaSBoLCLdF2SJJK/b5OFydON1Shg/gc2QCGC2jXdkXg/2FsyoEv3Uj2exxt5+oyWD HqasLUYwIn1UvMAKqP2OsjlNttH6hsp77eTDA8/Iwn/pvOC12UXx4CWnzvcLQ4DuL7Ggiedu2 EtoTEfhGSTy64BBaLbQKHTncrlGod4+A0cGrhcNtyypCpfL6CpVLpdqmP/SXZ+3tBXYbWN76o QU/3X+LjtU/aEm7p0Kofhac+rV/5opjWP4z59QGdgTLSmuPvnjHyTXKMMUGCBRxm+Z2HRfWDN xvwuWJnCKWpyyR0DH1gYhsTR4x1tOrxHCUrLBfOuvmQw6XmD0P5Kz12R+QlO85gYgeN2aqT7m 59nE7/2QbZuPAUMj4MOJf1P+UZ15FpmYyRYf4B7ukJYrGhY7N5F1xyiHA3IX9th4zyMClvQB 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:175824 Archived-At: Let me clarify this one last time. > The "pattern" use case is not the "wildcard" use case. "pattern" is an u= nspecified string, while "wildcard" is backend specific. For SVN it is a g= lob(7) expression without subdirectories (otherwise it does not match anyt= hing). > "pattern" is a generic term, which does not imply a specific syntax. "wildcard specification" is a pattern following the rules of a glob(7) syntax variant. "regexp pattern" implies one of the regular expression syntaxes (regex(7), Emacs, Perl, Python, ...). Citing from 4.2.1. file pathes are not patterns (http://sw-amt.ws/emacs/do= c/_build/html/emacs-vc-ignore-feature.html#file-pathes-are-not-patterns): =C2=A0=C2=A0=C2=A0 Assuming that a file path is always a pattern that matc= hes the =C2=A0=C2=A0=C2=A0 file path unambiguously is simply wrong. =C2=A0=C2=A0=C2=A0 When ignoring a specific file path and nothing but that= file =C2=A0=C2=A0=C2=A0 path, a pattern must be constructed that matches the fi= le path =C2=A0=C2=A0=C2=A0 exactly. The syntax for this pattern is backend specifi= c and the =C2=A0=C2=A0=C2=A0 pattern is generally not the file path itself. In other= words: it =C2=A0=C2=A0=C2=A0 is an exception that a file path and the exactly matchi= ng pattern =C2=A0=C2=A0=C2=A0 are identical strings. Specifically, if a file path con= tains a =C2=A0=C2=A0=C2=A0 character with special meaning in the pattern syntax, t= hen the =C2=A0=C2=A0=C2=A0 matching pattern cannot be identical to the file path s= ince the =C2=A0=C2=A0=C2=A0 special character must be escaped. =C2=A0=C2=A0=C2=A0 +-------------+-----------------+---------------+------= -----------+--------------------+ =C2=A0=C2=A0=C2=A0 | `file path` | glob(7)=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 | anchored glob | Hg `regex`=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 | Bzr `regex`=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | =C2=A0=C2=A0=C2=A0 +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D+=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D+=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D+=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D+=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D+ =C2=A0=C2=A0=C2=A0 | test[56].xx |=C2=A0=C2=A0 test\[56].xx=C2=A0 | /test\= [56].xx | ^test\[56]\.xx$ | RE:^test\[56]\.xx$ | =C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0 test[[]56].xx |=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | =C2=A0=C2=A0=C2=A0 +-------------+-----------------+---------------+------= -----------+--------------------+ =C2=A0=C2=A0=C2=A0 | simple.txt=C2=A0 |=C2=A0=C2=A0 simple.txt=C2=A0=C2=A0= =C2=A0 | /simple.txt=C2=A0=C2=A0 | ^simple\.txt$=C2=A0=C2=A0 | RE:^simple\= .txt$=C2=A0=C2=A0 | =C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 |=C2=A0=C2=A0 simple[.]txt=C2=A0 |=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 |=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | =C2=A0=C2=A0=C2=A0 +-------------+-----------------+---------------+------= -----------+--------------------+ =C2=A0=C2=A0=C2=A0 The correct escaping of FILE can only be determined by = the =C2=A0=C2=A0=C2=A0 backend. Therefore neither vc-dir-ignore nor lisp code = calling =C2=A0=C2=A0=C2=A0 vc-ignore can escape the FILE parameter correctly witho= ut support =C2=A0=C2=A0=C2=A0 from the backend. This makes pattern input for FILE onl= y useful =C2=A0=C2=A0=C2=A0 during interactive calls. Even, if it was magically possible to determine the correct pattern in the frontend, submitting an anchored glob "/some-sub/file.txt" to `vc-ignore` would be interpreted as an absolute path. In other words, the API specificaton =C2=A0 [...] FILE is a wildcard specification, either relative to =C2=A0 DIRECTORY or absolute. which asks for implementing the pattern use case inextricably mixed with the file path use case, is nonsense. It also means, that all of the backend functions which currently demand a pattern are absolutely useless. Therefore the API change request is specifically: =C2=A0=C2=A0=C2=A0 (defun vc-ignore (file-or-pattern &optional directory r= emove as-is) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "Ignore FILE-OR-PATTERN under VCS of DIRECT= ORY. =C2=A0=C2=A0=C2=A0 DIRECTORY defaults to `default-directory' and is used t= o =C2=A0=C2=A0=C2=A0 determine the responsible VC backend. =C2=A0=C2=A0=C2=A0 When REMOVE is non-nil, remove FILE-OR-PATTERN from the= list of =C2=A0=C2=A0=C2=A0 ignored files. =C2=A0=C2=A0=C2=A0 If AS-IS is nil, FILE-OR-PATTERN is considered a file p= ath that =C2=A0=C2=A0=C2=A0 must be escaped and anchored. The directory name of =C2=A0=C2=A0=C2=A0 FILE-OR-PATTERN expanded against DIRECTORY is used to d= etermine =C2=A0=C2=A0=C2=A0 the ignore file.=C2=A0 The effective pattern consists o= f the file path =C2=A0=C2=A0=C2=A0 relative to the directory of the ignore file, properly = escaped =C2=A0=C2=A0=C2=A0 and anchored by the VC backend. =C2=A0=C2=A0=C2=A0 If AS-IS is non-nil, FILE-OR-PATTERN is considered a pa= ttern that =C2=A0=C2=A0=C2=A0 should not be modified.=C2=A0 DIRECTORY is used to dete= rmine the =C2=A0=C2=A0=C2=A0 ignore file."