From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 06 03:18:26 2019 Received: (at submit) by debbugs.gnu.org; 6 Feb 2019 08:18:26 +0000 Received: from localhost ([127.0.0.1]:33982 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1grIPZ-0001YO-Ne for submit@debbugs.gnu.org; Wed, 06 Feb 2019 03:18:26 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44148) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1grIPX-0001YC-QV for submit@debbugs.gnu.org; Wed, 06 Feb 2019 03:18:24 -0500 Received: from lists.gnu.org ([209.51.188.17]:48100) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1grIPR-0003hy-52 for submit@debbugs.gnu.org; Wed, 06 Feb 2019 03:18:18 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58529) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grIPQ-0002He-25 for bug-gnu-emacs@gnu.org; Wed, 06 Feb 2019 03:18:16 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: * X-Spam-Status: No, score=1.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, FROM_EXCESS_BASE64,HTML_MESSAGE autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1grIPP-0003hG-7D for bug-gnu-emacs@gnu.org; Wed, 06 Feb 2019 03:18:16 -0500 Received: from mail-ua1-x92e.google.com ([2607:f8b0:4864:20::92e]:33527) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1grIPO-0003gt-Vt for bug-gnu-emacs@gnu.org; Wed, 06 Feb 2019 03:18:15 -0500 Received: by mail-ua1-x92e.google.com with SMTP id t8so2007663uap.0 for ; Wed, 06 Feb 2019 00:18:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=geeC4rD8uYHzhyaR0uSPAC4EQ6M/NIFg0j+LAwAZ37g=; b=HnnH8ntzh2hIhtxbmNM83SMy/awxx3WPR7X+YlbydJsH3SfCQ0xCQTJliCOgTO690Q 3JyV/9meurRhwsz8520sTH+liwiTNx1Yold4oBcQW/wHkv+NvP0LbdFwCMer90Hw6GuG Tra2UFd/wKCBSLLb4n68pWf7wVR4L+ss+DFoYaI3rTnPyHzXmUlX3jcxp7FmjbbGDkp5 atb+odqa/iqaG+cdDIj/p6xnbIsNmVc0vAqnGHTu70dduz8/jgc5DJ9simomDZzxpazh AtIuKVXgolkklMdbIiydq6NLjDPcoJAbp1SNDcfjwm9W7mQ1BPTkyeQfhvIrg4M3pIDk sELA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=geeC4rD8uYHzhyaR0uSPAC4EQ6M/NIFg0j+LAwAZ37g=; b=Y4ZUmr7OOwASGabD02BrkJfkUcOT/e66wgmZxI1Psxud22YuMr2wV1FENbRYi62zwV nfXzvlstPboUxmE+zMwG172eufcWVsbdS/WuviIGjUUkmCqN6Ao7DCvIYdV8Hkwcxe3b t9U9ARgvc8XSONyYLVVK7FYfSmXdmBlVplaoZWpkZyc3lKVKKjronYtQuvlvss5hhKPi 0p6ONM5pJpHeWyMMaOMylKhs+uQ8rz6vfkyqPk8oxWLTMwCP5gmOsODMVWTApcKeWZW7 IGG91fPw5jV1BUzuzd6RVkVWUxgrvvfrvcaWDUAb5y6p1Pzvt9FLX3I6KkZ2Q9/0ow57 zIGQ== X-Gm-Message-State: AHQUAubqkhB30x5VRjWP1dodsJeW7Q+wQ9AbNvyxYuIWfIlGI54Torer OrUSNcR3w4z8Nw8i4SI1yr64orLsxacCbbuTaqMu7FC4 X-Google-Smtp-Source: AHgI3Ib9PPnSowMpv47L+Snt0baXOD3KXpPYDfaHS2nJ9PmxzXmfAsnIHNL8z0cZqTEC/qC4pMaH8fkQ2BdmgmMsOLk= X-Received: by 2002:ab0:e03:: with SMTP id g3mr3406878uak.62.1549441093359; Wed, 06 Feb 2019 00:18:13 -0800 (PST) MIME-Version: 1.0 From: =?UTF-8?B?RmVsaWNpw6FuIE7DqW1ldGg=?= Date: Wed, 6 Feb 2019 09:18:02 +0100 Message-ID: Subject: [PATCH] Make project--find-regexp-in-files work with remote files To: bug-gnu-emacs@gnu.org Content-Type: multipart/mixed; boundary="000000000000f8b5570581355d6c" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::92e X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: 1.1 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi, The attached patch enhances the remote file support of project.el. It also has a new "require" statement, which might be problematic. Additionally, project--collect-matches will look very similar to x [...] Content analysis details: (1.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (felician.nemeth[at]gmail.com) 0.0 HTML_MESSAGE BODY: HTML included in message 0.1 FROM_EXCESS_BASE64 From: base64 encoded unnecessarily X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.1 (/) --000000000000f8b5570581355d6c Content-Type: multipart/alternative; boundary="000000000000f8b5540581355d6a" --000000000000f8b5540581355d6a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, The attached patch enhances the remote file support of project.el. It also has a new "require" statement, which might be problematic. Additionally, project--collect-matches will look very similar to xref-collect-matches creating a chance to unify the two functions later. Thanks, Felici=C3=A1n --000000000000f8b5540581355d6a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

The attached patch enhances the remote fil= e support of project.el. It also has a new "require" statement, w= hich might be problematic.=C2=A0 Additionally, project--collect-matches wil= l look very similar to xref-collect-matches creating a chance to unify the = two functions later.

Thanks,
Felici=C3= =A1n

--000000000000f8b5540581355d6a-- --000000000000f8b5570581355d6c Content-Type: text/x-patch; charset="US-ASCII"; name="0001-Make-project-find-regexp-in-files-work-with-remote-f.patch" Content-Disposition: attachment; filename="0001-Make-project-find-regexp-in-files-work-with-remote-f.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_jrswyjzl0 RnJvbSA2ZjY1ZWM5NDYyZWViZmQ0MDU3NjhlMWIyYzczMGZjM2Y0ZTY1YjRhIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiA9P1VURi04P3E/RmVsaWNpPUMzPUExbj0yME49QzM9QTltZXRo Pz0gPGZlbGljaWFuLm5lbWV0aEBnbWFpbC5jb20+CkRhdGU6IFdlZCwgNiBGZWIgMjAxOSAwODo1 OTozNCArMDEwMApTdWJqZWN0OiBbUEFUQ0hdIE1ha2UgcHJvamVjdC0tZmluZC1yZWdleHAtaW4t ZmlsZXMgd29yayB3aXRoIHJlbW90ZSBmaWxlcwoKKiBwcm9qZWN0LmVsOiBSZXF1aXJlIHNlcS4K KHByb2plY3QtLWNvbGxlY3QtbWF0Y2hlcyk6IE5ldyBmdW5jdGlvbiBleHRyYWN0ZWQKZnJvbSBw cm9qZWN0LS1maW5kLXJlZ2V4cC1pbi1maWxlczsgaGFuZGxlIHJlbW90ZSBmaWxlcy4KKHByb2pl Y3QtLWZpbmQtcmVnZXhwLWluLWZpbGVzKTogR3JvdXAgZmlsZXMgYmFzZWQgb24gdGhlaXIKcmVt b3RlLWlkLCBjYWxsIHRoZSBuZXcgZnVuY3Rpb24gb24gdGhlIGdyb3Vwcy4KLS0tCiBsaXNwL3By b2dtb2Rlcy9wcm9qZWN0LmVsIHwgMjggKysrKysrKysrKysrKysrKysrKysrKy0tLS0tLQogMSBm aWxlIGNoYW5nZWQsIDIyIGluc2VydGlvbnMoKyksIDYgZGVsZXRpb25zKC0pCgpkaWZmIC0tZ2l0 IGEvbGlzcC9wcm9nbW9kZXMvcHJvamVjdC5lbCBiL2xpc3AvcHJvZ21vZGVzL3Byb2plY3QuZWwK aW5kZXggODE1Y2M3Y2QzZC4uNTgzM2U2NDAxYiAxMDA2NDQKLS0tIGEvbGlzcC9wcm9nbW9kZXMv cHJvamVjdC5lbAorKysgYi9saXNwL3Byb2dtb2Rlcy9wcm9qZWN0LmVsCkBAIC04OCw2ICs4OCw3 IEBACiA7OzsgQ29kZToKIAogKHJlcXVpcmUgJ2NsLWdlbmVyaWMpCisocmVxdWlyZSAnc2VxKQog CiAoZGVmdmFyIHByb2plY3QtZmluZC1mdW5jdGlvbnMgKGxpc3QgIydwcm9qZWN0LXRyeS12YykK ICAgIlNwZWNpYWwgaG9vayB0byBmaW5kIHRoZSBwcm9qZWN0IGNvbnRhaW5pbmcgYSBnaXZlbiBk aXJlY3RvcnkuCkBAIC0zNzQsMTIgKzM3NSwyOSBAQCBwcm9qZWN0LW9yLWV4dGVybmFsLWZpbmQt cmVnZXhwCiAgICAgKHByb2plY3QtLWZpbmQtcmVnZXhwLWluLWZpbGVzIHJlZ2V4cCBmaWxlcykp KQogCiAoZGVmdW4gcHJvamVjdC0tZmluZC1yZWdleHAtaW4tZmlsZXMgKHJlZ2V4cCBmaWxlcykK KyAgKGxldCogKCh4cmVmLWdyb3VwcworICAgICAgICAgIChtYXBjYXIKKyAgICAgICAgICAgKGxh bWJkYSAoZ3JvdXApCisgICAgICAgICAgICAgKGxldCogKChmaWxlcyAoY2RyIGdyb3VwKSkKKyAg ICAgICAgICAgICAgICAgICAgKGxvY2FsLWZpbGVzIChtYXBjYXIgIydmaWxlLWxvY2FsLW5hbWUg ZmlsZXMpKQorICAgICAgICAgICAgICAgICAgICAoZGlyIChmaWxlLW5hbWUtZGlyZWN0b3J5IChj YXIgZmlsZXMpKSkpCisgICAgICAgICAgICAgICAocHJvamVjdC0tY29sbGVjdC1tYXRjaGVzIHJl Z2V4cCBsb2NhbC1maWxlcyBkaXIpKSkKKyAgICAgICAgICAgKHNlcS1ncm91cC1ieSAjJ2ZpbGUt cmVtb3RlLXAgZmlsZXMpKSkKKyAgICAgICAgICh4cmVmcyAoYXBwbHkgIydhcHBlbmQgeHJlZi1n cm91cHMpKSkKKyAgICAodW5sZXNzIHhyZWZzCisgICAgICAodXNlci1lcnJvciAiTm8gbWF0Y2hl cyBmb3I6ICVzIiByZWdleHApKQorICAgICh4cmVmLS1zaG93LXhyZWZzIHhyZWZzIG5pbCkpKQor CisoZGVmdW4gcHJvamVjdC0tY29sbGVjdC1tYXRjaGVzIChyZWdleHAgZmlsZXMgZGlyKQorICAi Q29sbGVjdCBtYXRjaGVzIGZvciBSRUdFWFAgaW5zaWRlIEZJTEVTIGluIERJUi4KK0ZJTEVTIGlz IGEgbGlzdCBvZiBmaWxlIG5hbWVzLiIKKyAgOzsgQ2YuIGB4cmVmLWNvbGxlY3QtbWF0Y2hlcycu CiAgIChwY2FzZS1sZXQqCiAgICAgICAoKG91dHB1dCAoZ2V0LWJ1ZmZlci1jcmVhdGUgIiAqcHJv amVjdCBncmVwIG91dHB1dCoiKSkKICAgICAgICAoYCgsZ3JlcC1yZSAsZmlsZS1ncm91cCAsbGlu ZS1ncm91cCAuICxfKSAoY2FyIGdyZXAtcmVnZXhwLWFsaXN0KSkKICAgICAgICAoc3RhdHVzIG5p bCkKICAgICAgICAoaGl0cyBuaWwpCi0gICAgICAgKHhyZWZzIG5pbCkKKyAgICAgICAocmVtb3Rl LWlkIChmaWxlLXJlbW90ZS1wIGRpcikpCiAgICAgICAgKGNvbW1hbmQgKGZvcm1hdCAieGFyZ3Mg LTAgZ3JlcCAlcyAtbkhlICVzIgogICAgICAgICAgICAgICAgICAgICAgICAgKGlmIChhbmQgY2Fz ZS1mb2xkLXNlYXJjaAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGlzZWFyY2gt bm8tdXBwZXItY2FzZS1wIHJlZ2V4cCB0KSkKQEAgLTM5MCw2ICs0MDgsNyBAQCBwcm9qZWN0LS1m aW5kLXJlZ2V4cC1pbi1maWxlcwogICAgICAgKGVyYXNlLWJ1ZmZlcikKICAgICAgICh3aXRoLXRl bXAtYnVmZmVyCiAgICAgICAgIChpbnNlcnQgKG1hcGNvbmNhdCAjJ2lkZW50aXR5IGZpbGVzICJc MCIpKQorICAgICAgICAoc2V0cSBkZWZhdWx0LWRpcmVjdG9yeSBkaXIpCiAgICAgICAgIChzZXRx IHN0YXR1cwogICAgICAgICAgICAgICAocHJvamVjdC0tcHJvY2Vzcy1maWxlLXJlZ2lvbiAocG9p bnQtbWluKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAocG9p bnQtbWF4KQpAQCAtNDA3LDEzICs0MjYsMTAgQEAgcHJvamVjdC0tZmluZC1yZWdleHAtaW4tZmls ZXMKICAgICAgICAgICAgICAgICAgICAgKGJ1ZmZlci1zdWJzdHJpbmcgKHBvaW50LW1pbikgKGxp bmUtZW5kLXBvc2l0aW9uKSkpKQogICAgICAgKHdoaWxlIChyZS1zZWFyY2gtZm9yd2FyZCBncmVw LXJlIG5pbCB0KQogICAgICAgICAocHVzaCAobGlzdCAoc3RyaW5nLXRvLW51bWJlciAobWF0Y2gt c3RyaW5nIGxpbmUtZ3JvdXApKQotICAgICAgICAgICAgICAgICAgICAobWF0Y2gtc3RyaW5nIGZp bGUtZ3JvdXApCisgICAgICAgICAgICAgICAgICAgIChjb25jYXQgcmVtb3RlLWlkIChtYXRjaC1z dHJpbmcgZmlsZS1ncm91cCkpCiAgICAgICAgICAgICAgICAgICAgIChidWZmZXItc3Vic3RyaW5n LW5vLXByb3BlcnRpZXMgKHBvaW50KSAobGluZS1lbmQtcG9zaXRpb24pKSkKICAgICAgICAgICAg ICAgaGl0cykpKQotICAgIChzZXRxIHhyZWZzICh4cmVmLS1jb252ZXJ0LWhpdHMgKG5yZXZlcnNl IGhpdHMpIHJlZ2V4cCkpCi0gICAgKHVubGVzcyB4cmVmcwotICAgICAgKHVzZXItZXJyb3IgIk5v IG1hdGNoZXMgZm9yOiAlcyIgcmVnZXhwKSkKLSAgICAoeHJlZi0tc2hvdy14cmVmcyB4cmVmcyBu aWwpKSkKKyAgICAoeHJlZi0tY29udmVydC1oaXRzIChucmV2ZXJzZSBoaXRzKSByZWdleHApKSkK IAogKGRlZnVuIHByb2plY3QtLXByb2Nlc3MtZmlsZS1yZWdpb24gKHN0YXJ0IGVuZCBwcm9ncmFt CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJm9wdGlvbmFsIGJ1ZmZlciBk aXNwbGF5Ci0tIAoyLjExLjAKCg== --000000000000f8b5570581355d6c-- From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 13 20:17:35 2019 Received: (at 34343) by debbugs.gnu.org; 14 Feb 2019 01:17:35 +0000 Received: from localhost ([127.0.0.1]:47514 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gu5eh-00042K-Ai for submit@debbugs.gnu.org; Wed, 13 Feb 2019 20:17:35 -0500 Received: from mail-lf1-f65.google.com ([209.85.167.65]:37533) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gu5ef-000426-0e for 34343@debbugs.gnu.org; Wed, 13 Feb 2019 20:17:33 -0500 Received: by mail-lf1-f65.google.com with SMTP id n23so3291589lfl.4 for <34343@debbugs.gnu.org>; Wed, 13 Feb 2019 17:17:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=uW2opesZ75++F4r3F7Nq8BPCeoUzifYfxeCbHtb8AEM=; b=AvCEhrj8MftCmv89fvCY2jAj1J8/uOWTX1gWtMn8sRU6X+yW0dZqz58TBnVxT9wkSR Eu7hcwWwg/EaKmFUagvdcb8Ut6To1hy/NqAF0kzNaNgdEhdcf0nhFj4yflFKzRpQE4sy KFWAU5AzXEOFyk778dyFE80JroGYr21XapflniY9hx6P/yCdycilyD5f48e7jXEvpuLw dKPvZjElMDhZrlPK/RWsjeBKxCjaUzteBiyr5g99KfXaqwV/vMAS72V108yYYMCBw/vj fdeoXvUgJGDWYVs+bWj3dqwk8Wzv1K+3klBbUjqa6Fn199k5+4bfa9VPIQx0uyhssB0a ECSQ== 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:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=uW2opesZ75++F4r3F7Nq8BPCeoUzifYfxeCbHtb8AEM=; b=TsJQXL3j77XyKHTReHSX3kVtqwMKW1Pje2PruwbR0avxGHSfYSZw1PVGDFjiM/dN8c 5K3Eny4SAiISCZqs1iU9+zoYk8u3AunMb9knHQ55Slu24lyVmUC4McEiTXRMhLEQHjmk CxLqeX1igK5IP+iyFRC7qqZpsEtUYy9dl4H9iLxizvUOUXT7XPRXRNT+Muu/KYW6sEPB I0r+oLQq1yZGBhNJyDmzNs4UKP/HOmM1+cmAVVWCEXRo2ihJRVIqJfJKG0K5ETCSh7t/ wWIGsixxWI3fgbGKZOVO3HPkQCFniRroqW/1f87bEV4mcrwaLZ/cct/JC/tQf/6l31We suqA== X-Gm-Message-State: AHQUAuYNmSb6EdtUGcNZQTRW0kDsgjRbVI+QYYRib9aIoBFKMLbiS5Ic 0kYjdWJIxHNR9e74G0cLNYI+0Xtj X-Google-Smtp-Source: AHgI3Ia5m57mN9H14AQzYyQI0W6dhSXLqPKwP4y9pCaUfKYi8s0ClXlVBaEHPEKfDUC8LsQczXWQhA== X-Received: by 2002:a19:4948:: with SMTP id l8mr642757lfj.156.1550107045705; Wed, 13 Feb 2019 17:17:25 -0800 (PST) Received: from [192.168.1.174] ([178.252.127.239]) by smtp.googlemail.com with ESMTPSA id g68sm158610ljg.53.2019.02.13.17.17.24 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Wed, 13 Feb 2019 17:17:24 -0800 (PST) Subject: Re: bug#34343: [PATCH] Make project--find-regexp-in-files work with remote files To: =?UTF-8?B?RmVsaWNpw6FuIE7DqW1ldGg=?= , 34343@debbugs.gnu.org References: From: Dmitry Gutov Message-ID: <9d65284f-7a64-5e9c-ab02-fbbd1be41689@yandex.ru> Date: Thu, 14 Feb 2019 04:17:24 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:65.0) Gecko/20100101 Thunderbird/65.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Score: 1.6 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On 06.02.2019 11:18, Felicián Németh wrote: > The attached patch enhances the remote file support of project.el. It > also has a new "require" statement, which might be problematic. Thank you for the patch, but I'm not a big fan of first creating a list of all files, and then grouping them again by directories (or a property of directories, but still). Content analysis details: (1.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [178.252.127.239 listed in dnsbl.sorbs.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [209.85.167.65 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.167.65 listed in wl.mailspike.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (raaahh[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.1 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different X-Debbugs-Envelope-To: 34343 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.6 (/) On 06.02.2019 11:18, Felicián Németh wrote: > The attached patch enhances the remote file support of project.el. It > also has a new "require" statement, which might be problematic. Thank you for the patch, but I'm not a big fan of first creating a list of all files, and then grouping them again by directories (or a property of directories, but still). First of all, I think we might reasonably expect that either all files are remote (and on the same host), or none of them are. If that assumption doesn't ring true to you, I think we should instead run one xargs process per directory, not the whole file list. Then, project--find-regexp-in-files would return a list of xrefs (for files belonging to one directory), project-find-regexp can nconc it for all its directories and call xref--show-xrefs on the result. Since project-find-regexp and project-or-external-find-regexp will both have to do that, a helper function will also be needed. From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 15 13:53:32 2019 Received: (at 34343) by debbugs.gnu.org; 15 Feb 2019 18:53:32 +0000 Received: from localhost ([127.0.0.1]:49803 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1guic8-0001fD-CN for submit@debbugs.gnu.org; Fri, 15 Feb 2019 13:53:32 -0500 Received: from mail-vs1-f46.google.com ([209.85.217.46]:33782) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1guic7-0001f0-5M for 34343@debbugs.gnu.org; Fri, 15 Feb 2019 13:53:31 -0500 Received: by mail-vs1-f46.google.com with SMTP id u13so5450956vsk.0 for <34343@debbugs.gnu.org>; Fri, 15 Feb 2019 10:53:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wmV9kvFRurixDgnvMoRcnxyhvjC/P3sK8DR0dGVVCqs=; b=lxDyHv8j76EDyi4FIg6sOvNLZ/3IRyDXZrFUNUM2CEVBkatSK3kowI0tAZbYKaNMgH COD+pSKq3Z03mIi73kUIE5CtYR1c5VF1zlphGKc4ekk5Ic6yj7ZKgUgb5ul1nzKYoHBH wX757K8/aR9h5QZoUf3+xpCKaf65zF2UYB+Bx71hytklBchUqeTlQhrxIVbBLgXbv5Nn OYRKtgRj/bT/aeOasQabF4KjxHUzOdLdj+8hfDL8VrNYSVwQvfvbaNGLOMDkukyoTzD6 T2HY78sexs5BDppW++UNAdHlOm5loVha/FXsdHSNmKdODekDszxe2qbaN9PapuWYv2Og Uqew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wmV9kvFRurixDgnvMoRcnxyhvjC/P3sK8DR0dGVVCqs=; b=U6fP3ZyfKmGZy0CirowRKEtykQgBZxB0cweaeWnkPx1AnqHy27uyJtKhiowKwdua7f 7/+lbsPEOv4XlLnTHW/pCIFXKijDpdBc3k81NQWZRuTEKtjpSLQr4YhJXjIXJi6VdAJ7 e+w/L69NkCvgSPnOnBDzTsZD19I4WwpTFXEV3YzV5A3ouQB+9HUgN8fYigpdnF50iBaX B5h2tKyC9Sm6q2fOKyOEhSmxaOdrMQijTFnicfB23mJVwsdC/rlduSdkOIdTpVlY6gYv F4pSAq5QbatgNTzL8F9GRr0Yc4ADmRwjU0A7Mu0PgV2bQprATQUz7uFTfPSfEqauWaRB K/Rg== X-Gm-Message-State: AHQUAuaGsT7D9mc3ZedV0GY6todELM2EPVG11Di+QhBsVao9eKnA1+fg pw2Cj1TwdbAbOP5GY+NMmGC4NhQE2SYJaFKGUxo= X-Google-Smtp-Source: AHgI3IYiY0We3A3EmFl/FhWCOqlhony7r/1HetqpipS4yJV2O41EQHkP2gpLQerSfSN0HtG21bAgHzcAnAiKG6z7epM= X-Received: by 2002:a67:df96:: with SMTP id x22mr6094936vsk.72.1550256804471; Fri, 15 Feb 2019 10:53:24 -0800 (PST) MIME-Version: 1.0 References: <9d65284f-7a64-5e9c-ab02-fbbd1be41689@yandex.ru> In-Reply-To: <9d65284f-7a64-5e9c-ab02-fbbd1be41689@yandex.ru> From: =?UTF-8?B?RmVsaWNpw6FuIE7DqW1ldGg=?= Date: Fri, 15 Feb 2019 19:53:13 +0100 Message-ID: Subject: Re: bug#34343: [PATCH] Make project--find-regexp-in-files work with remote files To: Dmitry Gutov Content-Type: multipart/mixed; boundary="00000000000024598a0581f34a15" X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 34343 Cc: 34343@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.9 (/) --00000000000024598a0581f34a15 Content-Type: text/plain; charset="UTF-8" On Thu, Feb 14, 2019 at 2:17 AM Dmitry Gutov wrote: > > First of all, I think we might reasonably expect that either all files > are remote (and on the same host), or none of them are. OK. I've attached a new patch following that assumption. Thanks again. --00000000000024598a0581f34a15 Content-Type: text/x-patch; charset="US-ASCII"; name="0001-Make-project-find-regexp-in-files-work-with-remote-f.patch" Content-Disposition: attachment; filename="0001-Make-project-find-regexp-in-files-work-with-remote-f.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_js6eu54q0 RnJvbSA5ZGViNDI4MjNmZDA0M2I4MGM4YTVlOGY4ZTI4ZDk0ZGQ0MWQ3YjAwIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiA9P1VURi04P3E/RmVsaWNpPUMzPUExbj0yME49QzM9QTltZXRo Pz0gPGZlbGljaWFuLm5lbWV0aEBnbWFpbC5jb20+CkRhdGU6IEZyaSwgMTUgRmViIDIwMTkgMTk6 NDU6NTQgKzAxMDAKU3ViamVjdDogW1BBVENIXSBNYWtlIHByb2plY3QtLWZpbmQtcmVnZXhwLWlu LWZpbGVzIHdvcmsgd2l0aCByZW1vdGUgZmlsZXMKCiogcHJvamVjdC5lbCAocHJvamVjdC0tZmlu ZC1yZWdleHAtaW4tZmlsZXMpOiBIYW5kbGUgcmVtb3RlIGZpbGVzLgotLS0KIGxpc3AvcHJvZ21v ZGVzL3Byb2plY3QuZWwgfCAxMSArKysrKysrKystLQogMSBmaWxlIGNoYW5nZWQsIDkgaW5zZXJ0 aW9ucygrKSwgMiBkZWxldGlvbnMoLSkKCmRpZmYgLS1naXQgYS9saXNwL3Byb2dtb2Rlcy9wcm9q ZWN0LmVsIGIvbGlzcC9wcm9nbW9kZXMvcHJvamVjdC5lbAppbmRleCA1MzNlMjdiZTdlLi4zNjQ3 MDI5ZjU2IDEwMDY0NAotLS0gYS9saXNwL3Byb2dtb2Rlcy9wcm9qZWN0LmVsCisrKyBiL2xpc3Av cHJvZ21vZGVzL3Byb2plY3QuZWwKQEAgLTM5MCw2ICszOTAsMTIgQEAgcHJvamVjdC0tZmluZC1y ZWdleHAtaW4tZmlsZXMKICAgICAgICAoc3RhdHVzIG5pbCkKICAgICAgICAoaGl0cyBuaWwpCiAg ICAgICAgKHhyZWZzIG5pbCkKKyAgICAgICA7OyBBc3N1bWluZyBhbGwgZmlsZXMgYXJlIG9uIHRo ZSBzYW1lIGhvc3QuCisgICAgICAgKGRpciAoZmlsZS1uYW1lLWRpcmVjdG9yeSAoY2FyIGZpbGVz KSkpCisgICAgICAgKHJlbW90ZS1pZCAoZmlsZS1yZW1vdGUtcCBkaXIpKQorICAgICAgIChsb2Nh bC1maWxlcyAoaWYgcmVtb3RlLWlkCisgICAgICAgICAgICAgICAgICAgICAgICAobWFwY2FyICMn ZmlsZS1sb2NhbC1uYW1lIGZpbGVzKQorICAgICAgICAgICAgICAgICAgICAgIGZpbGVzKSkKICAg ICAgICAoY29tbWFuZCAoZm9ybWF0ICJ4YXJncyAtMCBncmVwICVzIC1uSGUgJXMiCiAgICAgICAg ICAgICAgICAgICAgICAgICAoaWYgKGFuZCBjYXNlLWZvbGQtc2VhcmNoCiAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAoaXNlYXJjaC1uby11cHBlci1jYXNlLXAgcmVnZXhwIHQpKQpA QCAtMzk5LDcgKzQwNSw4IEBAIHByb2plY3QtLWZpbmQtcmVnZXhwLWluLWZpbGVzCiAgICAgKHdp dGgtY3VycmVudC1idWZmZXIgb3V0cHV0CiAgICAgICAoZXJhc2UtYnVmZmVyKQogICAgICAgKHdp dGgtdGVtcC1idWZmZXIKLSAgICAgICAgKGluc2VydCAobWFwY29uY2F0ICMnaWRlbnRpdHkgZmls ZXMgIlwwIikpCisgICAgICAgIChpbnNlcnQgKG1hcGNvbmNhdCAjJ2lkZW50aXR5IGxvY2FsLWZp bGVzICJcMCIpKQorICAgICAgICAoc2V0cSBkZWZhdWx0LWRpcmVjdG9yeSBkaXIpCiAgICAgICAg IChzZXRxIHN0YXR1cwogICAgICAgICAgICAgICAocHJvamVjdC0tcHJvY2Vzcy1maWxlLXJlZ2lv biAocG9pbnQtbWluKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAocG9pbnQtbWF4KQpAQCAtNDE3LDcgKzQyNCw3IEBAIHByb2plY3QtLWZpbmQtcmVnZXhwLWlu LWZpbGVzCiAgICAgICAgICAgICAgICAgICAgIChidWZmZXItc3Vic3RyaW5nIChwb2ludC1taW4p IChsaW5lLWVuZC1wb3NpdGlvbikpKSkKICAgICAgICh3aGlsZSAocmUtc2VhcmNoLWZvcndhcmQg Z3JlcC1yZSBuaWwgdCkKICAgICAgICAgKHB1c2ggKGxpc3QgKHN0cmluZy10by1udW1iZXIgKG1h dGNoLXN0cmluZyBsaW5lLWdyb3VwKSkKLSAgICAgICAgICAgICAgICAgICAgKG1hdGNoLXN0cmlu ZyBmaWxlLWdyb3VwKQorICAgICAgICAgICAgICAgICAgICAoY29uY2F0IHJlbW90ZS1pZCAobWF0 Y2gtc3RyaW5nIGZpbGUtZ3JvdXApKQogICAgICAgICAgICAgICAgICAgICAoYnVmZmVyLXN1YnN0 cmluZy1uby1wcm9wZXJ0aWVzIChwb2ludCkgKGxpbmUtZW5kLXBvc2l0aW9uKSkpCiAgICAgICAg ICAgICAgIGhpdHMpKSkKICAgICAoc2V0cSB4cmVmcyAoeHJlZi0tY29udmVydC1oaXRzIChucmV2 ZXJzZSBoaXRzKSByZWdleHApKQotLSAKMi4xMS4wCgo= --00000000000024598a0581f34a15-- From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 27 04:16:10 2019 Received: (at 34343) by debbugs.gnu.org; 27 Feb 2019 09:16:10 +0000 Received: from localhost ([127.0.0.1]:53528 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gyvJy-0006fS-I3 for submit@debbugs.gnu.org; Wed, 27 Feb 2019 04:16:10 -0500 Received: from mout.gmx.net ([212.227.15.19]:47383) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gyvJw-0006fD-Fv for 34343@debbugs.gnu.org; Wed, 27 Feb 2019 04:16:09 -0500 Received: from detlef.gmx.de ([213.220.147.65]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LbuCq-1hOOFZ1SgG-00jIbk; Wed, 27 Feb 2019 10:16:01 +0100 From: Michael Albinus To: Dmitry Gutov Subject: Re: bug#34343: [PATCH] Make project--find-regexp-in-files work with remote files References: <9d65284f-7a64-5e9c-ab02-fbbd1be41689@yandex.ru> Date: Wed, 27 Feb 2019 10:15:59 +0100 In-Reply-To: (Dmitry Gutov's message of "Tue, 26 Feb 2019 04:09:10 +0300") Message-ID: <87r2bt1tio.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:78jk0XDcp8ESBefoJQVpjU0kGLpuIbmedmu81LHD2GkTH5T8Joy BdzkPNtZweqrPSJe+VA0EFlu7QuOg/69UKhQuXaVn05qGh5lKr8OFZzWp3vUnxMYY6ByqIg 3EtEvShXvyH8Ov+MtYxAA+Sjn7/M88cneNOx7+/YTE1WFOeRRNHVVOE5orRcxiNT9yZJaUA h1GFCZ9d/PYMw+yfTOtMg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:TQVPijulAJc=:1sGsSgJxfkx42Ev6IwXDOF WQGB8KHojeisCmyqN04uALP0PVVWm+g4dzZHAJMfTdczCxTzVBI2U8XitSt6Xq502shB/aZSO 6t6J0C8SNGpRVTjq3Aky7B7kB36DcYyVAdulxvfAsv/KY69ShkJmEAxAa2cUPmrU/+k7JgmXu 7kIGPeLNDY4vN+Gp/H+UBrEIO2RcMkYJ4E1/cfJD0KU/rUulQ3g+IRzOrNbllbI+aQKSyHKvO fZhVT6Ef7p98xPMvIEuuZ/fa+7KL/mEDlZQoGGoZd8HWHmI9aBop+NWN0RGlD6bmqo6aRG70x jyEmhw1XmAKx/ouopNCdSCliB9uIvIShoQI3+NZ+1TYw1zWNjV9JDkBz2FxNSkbYgZ5PN8DMi tkscId6pO5x6p4kZG/lHn+phAcjoKWp+6IaZ9Y5hOyRfYWeCFjlWKs6rDJk30/aFxR3frOVIZ bRrSbRNSIiVLG0sVaHqZiIYKxzDgR41+wO8T8vQAa0b6Ly6ytJE66r73ACV7+pmU3XZRncHSq SUVaPtFwwKBtUOj38D9kNMUjJHn2h6wHbd4Qxe2Hca02ifz6FhYIJoXO2cLoILyIQVc1/W+rL fJ711n8tKrXd7/744CmqKQRcbiEx+ZzB7LHZ0pxAsK90mvj9mXrI5CovkRL3KNtkWtIj+VtKu 8OyDw8tPVmGwumeSuhJ8HfiQUvB1+rxnVGq+gXnGKEtfeOLT/ObMq/PP3ESm2NdrsxeW3gJh1 WdlEdfBmJFEZq3dom36+D4XmNpboG8lkUYCbXZY7sObuzviSMOHxrVUGOfZ6Th6SwrAZQfuqF PtCS8bGaPraiXQp4e9L2SliFe4s6B6UfvfiZHmd3lJKoS/eDNisUaq1p/NCn2lN3Y+KlhtMbh +36qtbw8X9ivdRuQV5+g3zATLduQFzixbTl/rCON6pO3yFcPH/1HP5TTxEPd97a3eu146iFK1 iaR1rk2SnpA== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 34343 Cc: 34343@debbugs.gnu.org, =?utf-8?Q?Felici=C3=A1n_N=C3=A9meth?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Dmitry Gutov writes: Hi Dmitry, > Thank you. Before I apply this, I'd like to clarify one question with > Tramp's maintainer. > > Michael, do you think it's doing the right thing, conceptually? > > We first call the process in project-files, then process the returned > files names to make them remote (if necessary). > > Then, in project--find-regexp-in-files parses the files names again to > extract the remote id and the local names, does the process calls and > prepends the remote id again. > > Some kind of alternative would be to only use the local names until > the end, and keep the remote id in one place only. E.g. in > default-directory. Well, I don't know the internal logic in project.el. But indeed, it is an option to work only with the local file names, and to prepend the remote part of default-directory at the very end to the results. This must be done consequently, everywhere. Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 06 02:47:20 2019 Received: (at 34343) by debbugs.gnu.org; 6 Mar 2019 07:47:20 +0000 Received: from localhost ([127.0.0.1]:33698 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h1RGp-0003F6-Mt for submit@debbugs.gnu.org; Wed, 06 Mar 2019 02:47:19 -0500 Received: from mail-vs1-f52.google.com ([209.85.217.52]:45479) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h1RGn-0003Es-85 for 34343@debbugs.gnu.org; Wed, 06 Mar 2019 02:47:17 -0500 Received: by mail-vs1-f52.google.com with SMTP id n14so1647143vsp.12 for <34343@debbugs.gnu.org>; Tue, 05 Mar 2019 23:47:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=0mgZs5/xsllTpPKdJTinvEGC8lBPTYAOW45U2KJgPCE=; b=XjYECzUEijd89yHp610LxNjSoCmcy65IFBkaBuclQ6WhwTfuRU8ur1nK1BTf1V5uOm Pf9nNmsgl71nL3NReg5nuiXy4jFiXUvUNW2K0inBlfhgaauCY6sAMYa4lHSd9LFeHtr8 t+VgvkFlRWd9aOJShEIQPrd8MJ6BYoZQZi/dFzpTeoijsGEBCgiZW9Dd5LUSlZdQgvRl pwkMdZGZ8D1BQh9PihOMaFbTLr3mbV5E4axMT3bGzNSHD4XE69TyPJCvTAnhIrKc6ATc bpjrVst67EPz0Q9AeSlp6xU/GNq3Jg52Y6C9ryD5ho8hINjXdOMUOuZ4XJ1s9jmxxu/S DKQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=0mgZs5/xsllTpPKdJTinvEGC8lBPTYAOW45U2KJgPCE=; b=fsxdzh9NTO+Yoo1ZZ4S/uvoQ/eWAX3WrkpXSxoekuEjkr/1mh5uzry3towwxGrKs7R ObFp+rZWovhtxKLAg+wiwRJRlZarMLgxSHlVRRnB5fd+poybMhpeFB/TV5NFnUCCwYjn a4P/eHuPAMFBkJIInC1mEScEF12FjsGibfgQMYzMNEdkJSeA4kB2X+9/xJJ1thmKNUyK dB0sOap/ferfxNKNxi51RbYMaVozRT3DImtp0OjxWRfquIWicxFgyZ4aAi8PkmRrT2vO WuEO1gQZ3DTNEAnMg84cxDT8ZRd1pxv2QLk89lrYSRbDWIUpXfEwXu3ZfO5fKvV6Tr5t VRUw== X-Gm-Message-State: APjAAAVoN0kCeZLkh2rSLBymNGJVN+u+x1YICaUBRvKaa2jLD6fZnszr u7UbLRa45E7qc1NQuFrFQuKNMAvRj9RIHqex2ts= X-Google-Smtp-Source: APXvYqw3vw9jDChiS6tMVmLvnCGUFXbCvDjRMa1PBFxTC0TAXwo2gjYuUGwtEQybMq/72Jbd09uFcgNxVeUfkqyomyg= X-Received: by 2002:a67:7dd1:: with SMTP id y200mr2917035vsc.96.1551858431611; Tue, 05 Mar 2019 23:47:11 -0800 (PST) MIME-Version: 1.0 References: <9d65284f-7a64-5e9c-ab02-fbbd1be41689@yandex.ru> <87r2bt1tio.fsf@gmx.de> In-Reply-To: <87r2bt1tio.fsf@gmx.de> From: =?UTF-8?B?RmVsaWNpw6FuIE7DqW1ldGg=?= Date: Wed, 6 Mar 2019 08:47:00 +0100 Message-ID: Subject: Re: bug#34343: [PATCH] Make project--find-regexp-in-files work with remote files To: Michael Albinus Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 34343 Cc: 34343@debbugs.gnu.org, Dmitry Gutov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.9 (/) Hi Dmitry, > > Some kind of alternative would be to only use the local names until > > the end, and keep the remote id in one place only. E.g. in > > default-directory. > > Well, I don't know the internal logic in project.el. But indeed, it is > an option to work only with the local file names, and to prepend the > remote part of default-directory at the very end to the results. This > must be done consequently, everywhere. So how do you envision remote system support in project.el? One possibility is to have two new defgenerics, project-local-files and project-remote-id, and to use those internally. But I don't see how project-files could be changed in a backward compatible manner. New/updated backends don't have to implement p-files, because the result can be constructed using p-local-files and p-remote-id. But for old backends that only implement project-files it's the other way around: p-local-files and p-remote-id should rely on p-files to calculate their return values. What do you think? Thanks, Felici=C3=A1n From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 06 09:33:22 2019 Received: (at 34343) by debbugs.gnu.org; 6 Mar 2019 14:33:22 +0000 Received: from localhost ([127.0.0.1]:33873 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h1Xbm-0006RD-7H for submit@debbugs.gnu.org; Wed, 06 Mar 2019 09:33:22 -0500 Received: from mail-wm1-f50.google.com ([209.85.128.50]:40714) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h1Xbk-0006R0-Fc for 34343@debbugs.gnu.org; Wed, 06 Mar 2019 09:33:21 -0500 Received: by mail-wm1-f50.google.com with SMTP id g20so6050891wmh.5 for <34343@debbugs.gnu.org>; Wed, 06 Mar 2019 06:33:20 -0800 (PST) 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=1eOQ0d6bxwVD39B3+U8jtOsAILHhGVmIboPj4BZpwp0=; b=rRc4YSxt2ilH4t0tyJr+OAhOs6vPFLDNTDa1OYGE79zsDBL0+YqCrrAZOP3UMCarUr tIkI5EJek2SfTGy+SPHWBuTncnkSF82bT0wtWep74cBJJ+DMwFCjYi3egUDDlQ92jNgW 7AgONsrpWCL63njELMv7cNIuz+Ya9yJ6mSCnM0MTZz5ExAm2/BDdIl9uOSIr/jYn8HJh e+NOvQ+6xnuoh5998Xd1lLSnKhmelvE2PBjT7USyr1zQsgO0LFxSkGViQULIJdEQfv82 YNYCzSx+hkNxlKzKeydVmrveyZEZKMlA8zarYbjmZvFQb8nb03zCHjhbUjchJj2q6Olw zKeg== 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=1eOQ0d6bxwVD39B3+U8jtOsAILHhGVmIboPj4BZpwp0=; b=LT6M4tyOyjyUcqO/RZhdEDDob0AQVPOK6s3otq/qA74gP8RLGcs8BSKjJpaB64h7Sx 50Svxf2kZ/5emZAxuEUZtWO5McOn9KkklPuqV1GgY31HzPaiQuDnCF3QdXaq7aa0lVNO DSfh/85n1z1YVCG4+cKOybVfgQjFNms6jOPxJ6DGUB4Km4tG6SSMWFwyXhluAugVXzDD ESLMwc/ii1NYXFuyoKA8oyJ6EuGm3PG3zOrk74JT+YX05YDvhy7gwZ1OOyBGHkNIL4/S 56SrAimNXOhSA4cbYX7zLyzZcsTxAHdOL5MpQHzwe5Jd0qgTCPxPe6JEQac7TvgOeKzc z6qg== X-Gm-Message-State: APjAAAX2aoWHi2IZUW3y7qMunRj68WxND3g0XnZyFWlvFI6aNoPx0l2w 5k2m3147qvEBaZCAn/xvHT6K1jD0 X-Google-Smtp-Source: APXvYqzaIVFou7v3FBblP/2Hred3V5I8jGc5YQlbCD16V6/mT+BomWtTE7TON/b9izw5V4DmO+d2OQ== X-Received: by 2002:a05:600c:2210:: with SMTP id z16mr2556241wml.57.1551882794204; Wed, 06 Mar 2019 06:33:14 -0800 (PST) Received: from [192.168.0.195] ([109.110.245.170]) by smtp.googlemail.com with ESMTPSA id p16sm3675507wro.25.2019.03.06.06.33.12 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Wed, 06 Mar 2019 06:33:13 -0800 (PST) Subject: Re: bug#34343: [PATCH] Make project--find-regexp-in-files work with remote files To: =?UTF-8?B?RmVsaWNpw6FuIE7DqW1ldGg=?= , Michael Albinus References: <9d65284f-7a64-5e9c-ab02-fbbd1be41689@yandex.ru> <87r2bt1tio.fsf@gmx.de> From: Dmitry Gutov Message-ID: <2cfd53b2-8202-a321-a853-da0c949b0f15@yandex.ru> Date: Wed, 6 Mar 2019 16:33:11 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:66.0) Gecko/20100101 Thunderbird/66.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 34343 Cc: 34343@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) Hi Felician, On 06.03.2019 10:47, Felicián Németh wrote: > So how do you envision remote system support in project.el? > > One possibility is to have two new defgenerics, > project-local-files and project-remote-id, and to use those > internally. There's no point: generics dispatch to different backends, and I don't think we want to have a separate project backend for "remote" files. It's not a real type of project. > But I don't see how project-files could be changed in > a backward compatible manner. New/updated backends don't have to > implement p-files, because the result can be constructed using > p-local-files and p-remote-id. But for old backends that only > implement project-files it's the other way around: p-local-files > and p-remote-id should rely on p-files to calculate their return > values. The way to do that is to either pass the remote-ness information via composite return values or a global variable. I don't think using default-directory is viable for that purpose, though: the "current project" is allowed to be in a totally different directory. So I'll mull it over a little bit more (if you're not in a hurry, of course), and then probably commit one of your patches. Thank you. From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 06 09:45:10 2019 Received: (at 34343) by debbugs.gnu.org; 6 Mar 2019 14:45:10 +0000 Received: from localhost ([127.0.0.1]:33881 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h1XnB-0006iH-UO for submit@debbugs.gnu.org; Wed, 06 Mar 2019 09:45:10 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:43850) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h1XnA-0006hz-3Q for 34343@debbugs.gnu.org; Wed, 06 Mar 2019 09:45:08 -0500 Received: by mail-wr1-f66.google.com with SMTP id d17so13695144wre.10 for <34343@debbugs.gnu.org>; Wed, 06 Mar 2019 06:45:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=6mqc342pRo6obth+dhf0H2DmbYus0lSKUNnJsPfkloc=; b=ovKRevfgV5SisB2kTixQGakG5mThn/0AmAaejnvbK/Bzkd8wszWjCC7ivtU/cAk8Ok tYFdEPuOdxls0qeaRIizjEGVvAJVpU0vmVsSVvLUUpDVExdpDnGalEehAPHCDL3Hc152 AwxEG6kwbomEn9T14JBlCdzc9FZ9tEJ9417LRU4uivpADUbAVqyxfJSSob6lrXFTRS59 17dcSBaixlqaZLVD2L8EQVHcK2rG9vZPLUGjr0appypzmryIVfomiPqsHwOIu2xgqqq0 yLpFTMz3Nv41uDBPKL47SGotIiD6/dngMEzLm71rODr/bFD4Q37UgHFv0j0MyCQV5jAK pztA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:from:to:cc:references:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=6mqc342pRo6obth+dhf0H2DmbYus0lSKUNnJsPfkloc=; b=lwm7xP5j816NZ0f/3uUhmJXsNUI1zkEgsz9Ugato20BnmjauFX2wqOijvuAgbiBFoz zqfTfo4Z/kqzJ36qykGFPAQFZZHaGC57I5Amfq0KjXImUQ4FQ+PG1RasB6zZHb2cROze hojZi82wE1S2F3rhBbDUaJwA/Cgmg0UMJ0GwERPrJxJbP9l5SKnsyWtEuWvNwoKMTEKN 5bVxf/4UDDtvDRnNBiXQwc2g2si9DN39VD62vjhJHnY6tHTBYLT3lRvk2/mm406TNUgj 9uvb4bqNVlWKT4rgE6fXZm55w2YsyS3kvhI+YjJtrS0Elyb64NFn/g5lJ0nRRYs1Jhd9 PZZA== X-Gm-Message-State: APjAAAWQKZHB7AXHx3iH0afferK8E5a+i21Yh583oeFyYQtHhL7xvVq2 +G2K+sEAHakRCGCndvnv0QPPPooP X-Google-Smtp-Source: APXvYqzy5jBcV5Ar7zx997TPw9forQo0Nf1nYeKmbQuGVCfTVzSEXfekkoFcWOBTiaAS2h5yWMfv/Q== X-Received: by 2002:adf:f691:: with SMTP id v17mr3366378wrp.66.1551883501811; Wed, 06 Mar 2019 06:45:01 -0800 (PST) Received: from [192.168.0.195] ([109.110.245.170]) by smtp.googlemail.com with ESMTPSA id c202sm1948938wme.38.2019.03.06.06.45.00 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Wed, 06 Mar 2019 06:45:01 -0800 (PST) Subject: Re: bug#34343: [PATCH] Make project--find-regexp-in-files work with remote files From: Dmitry Gutov To: =?UTF-8?B?RmVsaWNpw6FuIE7DqW1ldGg=?= , Michael Albinus References: <9d65284f-7a64-5e9c-ab02-fbbd1be41689@yandex.ru> <87r2bt1tio.fsf@gmx.de> <2cfd53b2-8202-a321-a853-da0c949b0f15@yandex.ru> Message-ID: <6cf8bfa8-3873-d3db-9139-854359027e8a@yandex.ru> Date: Wed, 6 Mar 2019 16:44:59 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:66.0) Gecko/20100101 Thunderbird/66.0 MIME-Version: 1.0 In-Reply-To: <2cfd53b2-8202-a321-a853-da0c949b0f15@yandex.ru> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 34343 Cc: 34343@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) On 06.03.2019 17:33, Dmitry Gutov wrote: >> >> One possibility is to have two new defgenerics, >> project-local-files and project-remote-id, and to use those >> internally. > > There's no point: generics dispatch to different backends, and I don't > think we want to have a separate project backend for "remote" files. > It's not a real type of project. Although... I see your point now. So we can mandate that project-files returns local names. And add a new method that returns remote-id corresponding to the project. This will codify that the whole project must have one remote-id. Which is the assumption I asked you to make in the implementation, but it's a different thing to have in an API. So I wonder if somebody has an opinion on that. Maybe we'll want to include remote files as "external roots" in some projects? Or files inside archives? Opinions welcome. From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 08 03:28:21 2019 Received: (at 34343) by debbugs.gnu.org; 8 Mar 2019 08:28:21 +0000 Received: from localhost ([127.0.0.1]:35819 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h2Ard-0003oB-9g for submit@debbugs.gnu.org; Fri, 08 Mar 2019 03:28:21 -0500 Received: from mail-vs1-f54.google.com ([209.85.217.54]:42236) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h2Arb-0003nz-NL for 34343@debbugs.gnu.org; Fri, 08 Mar 2019 03:28:20 -0500 Received: by mail-vs1-f54.google.com with SMTP id c189so6184905vsd.9 for <34343@debbugs.gnu.org>; Fri, 08 Mar 2019 00:28:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=akZxhzSD8hoduvlbvxEdTiPKF4cSq9uEgkN3lB7FHqE=; b=MmAUv+w3nBouZFVkXKBCTDgkTZzuzEJY/pMAJZ5C/ETEBG67f5c/6ujTY4sjpjP1nr tIZy3k2mAN83uJLOp7IIfiDqnml0Dw5FPwgBEYw1FtWYzRhfT0uJ1cXJ62d9PVvAKeRH gm/+7YbQwTNnJeCNx7DADxSmxwHejHhGUFSxY9WjApGoUTb9y6GWUA+fvj4HB9Qgjgjj AXbuNxE3/HAlgO0Va8T8S/+28OoINYKhnTVxEsbzoB2K/x8VIfaHhVHD2BDkRjEkiPPl kidTp7/mZd1cp1xr2OKHkoNClea99EtgpzFozwK5i8TyCROGwH0NIbCmddl7UQeHTlC3 yaCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=akZxhzSD8hoduvlbvxEdTiPKF4cSq9uEgkN3lB7FHqE=; b=OoH5DBkRKzSGMD8urEwXDs/D2YLD1YpAWCZnMnsUoMv/GwkS3SNX8RorJKcPC/QAO7 KeC4lz+hNLL9INOY3R0Lk9r8eNIE/IOYENyzyT46TyL4vmrNKl9o1z/r2DL00YIMZkqd fSebhtj49HYeVdcMXhY08d/B6y74c3wTdyDwnWPkScM7GvLKWBowA937ZSMbiZLDYOko vmH9pBU1nk3Yxh2L5uZIkuWE56Kh4lD+kmTxhHZw/4CZzPrZAQNgVHbjCGHqvhg3n4Lg FZYErfxVALYpNHdfrZ66HVHDbqRynFaX3f6qo+/P62QpaUFCMmUfu7IGLYx3zavbDyHg GFjQ== X-Gm-Message-State: APjAAAUPINAH/KG4SoFB0JFdUrjQWmGPaOp4RVEAHHThX8CVXlCq6b+K vObFLtKdiaM/sR4g3w1Pn5A9D02WGapL78JMUcA= X-Google-Smtp-Source: APXvYqxqvDJm46sUYSDJ+LB8bbaH962g9qXA25cb57qlAw57Kx3R+3psEV3KNVp2vqpy98dQftYhk+XWEzkaHwUaB3s= X-Received: by 2002:a05:6102:256:: with SMTP id a22mr9219622vsq.173.1552033694073; Fri, 08 Mar 2019 00:28:14 -0800 (PST) MIME-Version: 1.0 References: <9d65284f-7a64-5e9c-ab02-fbbd1be41689@yandex.ru> <87r2bt1tio.fsf@gmx.de> <2cfd53b2-8202-a321-a853-da0c949b0f15@yandex.ru> <6cf8bfa8-3873-d3db-9139-854359027e8a@yandex.ru> In-Reply-To: <6cf8bfa8-3873-d3db-9139-854359027e8a@yandex.ru> From: =?UTF-8?B?RmVsaWNpw6FuIE7DqW1ldGg=?= Date: Fri, 8 Mar 2019 09:28:03 +0100 Message-ID: Subject: Re: bug#34343: [PATCH] Make project--find-regexp-in-files work with remote files To: Dmitry Gutov Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 34343 Cc: 34343@debbugs.gnu.org, Michael Albinus X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.9 (/) Hi Dmitry, I forgot that project-files are new in emacs-27, so there's no need to worry about backward compatibility. Also, there is no need to hurry either, because emacs-27 won't be released soon. Nevertheless, I would love to have a convenience function returning "complete" file names, even if the function's name is not project-files. > So we can mandate that project-files returns local names. And add a > new method that returns remote-id corresponding to the project. > > This will codify that the whole project must have one remote-id. > So I wonder if somebody has an opinion on that. Maybe we'll want to > include remote files as "external roots" in some projects? Or files > inside archives? I never worked on a project with multiple remote-ids. However, if we can come up with something simple that does not have significant performance impact on the local case, we should solve the general case, I think. Remote operations tend to be slow, so I think project.el can run more complex algorithms in that case. From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 26 09:04:11 2019 Received: (at 34343) by debbugs.gnu.org; 26 Dec 2019 14:04:11 +0000 Received: from localhost ([127.0.0.1]:55049 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ikTkJ-00018j-DD for submit@debbugs.gnu.org; Thu, 26 Dec 2019 09:04:11 -0500 Received: from mail-lf1-f66.google.com ([209.85.167.66]:38741) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ikTkH-00018T-ES for 34343@debbugs.gnu.org; Thu, 26 Dec 2019 09:04:10 -0500 Received: by mail-lf1-f66.google.com with SMTP id r14so18603134lfm.5 for <34343@debbugs.gnu.org>; Thu, 26 Dec 2019 06:04:09 -0800 (PST) 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=G6bpjXrHAg7JbQgRZkvd0p/UnJSAPYWK/XRi3NT7v2s=; b=oD2NQOX/FZ/OlF+Zs04GGb0efAdsymRiY4yGNmkTC1o8XOinqk5xMnJDjxWwFYwvYN /02tAMGoGmtFd5H11rLyTYg3s7PrkZI6adAYURMQgEHslFTT7pWuxOoDxVdSRFCbhSb/ yOfvkYtk650Oq0yRifGDNPm5RIY1SJM6lqacCBA9B/iYQFxGR5qPHWYe0Xd4SNiF/xuc +pAUnuFfcUc/MJIN59W1J1561H/0PqhRTPzXAkkyB3sZyOk/UHLqGDx2lh2/h40+iws1 Yy1ELGrzqDHLjE4IsqSNQ+SAIeuEEkDN8lyjM0AYfSHh4gukruYDKeMxY6p2+E+Rv2i/ oXjg== 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=G6bpjXrHAg7JbQgRZkvd0p/UnJSAPYWK/XRi3NT7v2s=; b=tTm32K9ITy7oeIEVaQcevk1UjEFf2tJJN1s+TJxGMNbEcF8Y3JOSB4RaYNtw+zfem5 LlG1pPPbr9aQDu4yUeSaiiBMj7/ROetBW/TUTrHZj/+Ueej/xyJnPj7iY6Yao95se3gA 1hi5kzV0gIZDEhZjfl/mlN9Cz6yUrg8Ns6RFdqwTPvqAH+k5K7drD6JgJiqn3ANs8tgw gXDiewzTckKMVNKN2W/EkaV04gfKVLr1SmPJVrD+dV3j11pFtXuQ7XKKmFn5MBdyCMPA IBcfgsN9QoVBHHeo/7f7LHQLATdIqxr3ZmlcDy3E2FDXxarWr53FChHXOynlZ/VQ9kzZ ShpA== X-Gm-Message-State: APjAAAVWytggZsYsol/bg/+BNEUlb2xkpKTT2JIZx1Z/0usJLpcXXfmn LOdo0dWsi/EY5Ib3h+IVn5wnMyrSAqU= X-Google-Smtp-Source: APXvYqx2LxQX0f8BNaoVbILaivIh/7CJGvFHASLL3FHSRTEQNMlkGUgCannkHB/onvOSEokGe7RjlQ== X-Received: by 2002:ac2:4c2b:: with SMTP id u11mr26398183lfq.46.1577369042972; Thu, 26 Dec 2019 06:04:02 -0800 (PST) Received: from [192.168.0.100] ([94.229.108.16]) by smtp.googlemail.com with ESMTPSA id p12sm13101504lfc.43.2019.12.26.06.04.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Dec 2019 06:04:02 -0800 (PST) Subject: Re: bug#34343: [PATCH] Make project--find-regexp-in-files work with remote files To: =?UTF-8?B?RmVsaWNpw6FuIE7DqW1ldGg=?= References: <9d65284f-7a64-5e9c-ab02-fbbd1be41689@yandex.ru> <87r2bt1tio.fsf@gmx.de> <2cfd53b2-8202-a321-a853-da0c949b0f15@yandex.ru> <6cf8bfa8-3873-d3db-9139-854359027e8a@yandex.ru> From: Dmitry Gutov Message-ID: Date: Thu, 26 Dec 2019 16:04:01 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 34343 Cc: 34343@debbugs.gnu.org, Michael Albinus X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On 08.03.2019 10:28, Felicián Németh wrote: > Hi Dmitry, > > I forgot that project-files are new in emacs-27, so there's no need to > worry about backward compatibility. Also, there is no need to hurry > either, because emacs-27 won't be released soon. Emacs 27 is approaching now. :-) >> So I wonder if somebody has an opinion on that. Maybe we'll want to >> include remote files as "external roots" in some projects? Or files >> inside archives? > > I never worked on a project with multiple remote-ids. However, if we > can come up with something simple that does not have significant > performance impact on the local case, we should solve the general case, > I think. Remote operations tend to be slow, so I think project.el can > run more complex algorithms in that case. I've done some benchmarking. If the project is big (e.g. gecko-dev with 200000+ files), and it resides locally, and the hdd is fast, and we can fetch the list of files quickly (i.e. it uses Git), (seq-group-by #'file-remote-p all-files) is pretty slow. For instance, in that example on my machine, (project-files (project-current)) takes 1.6s. And (seq-group-by #'file-remote-p all-files) itself takes 1s, and (mapcar #'file-local-name files)) takes another 0.9s. While Xargs+Grep only take another 3-4 seconds. So overall the remoteness processing takes a significant portion of the time in the local case even if we do it the smart way (e.g. avoid mapping through #'file-local-name if remote-id is nil). So I've pushed a more simplistic patch to emacs-27 (commit be38e39fcc). Felicián and Michael, please take a look. From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 27 03:24:28 2019 Received: (at 34343) by debbugs.gnu.org; 27 Dec 2019 08:24:28 +0000 Received: from localhost ([127.0.0.1]:56476 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ikkv6-0004sv-AH for submit@debbugs.gnu.org; Fri, 27 Dec 2019 03:24:28 -0500 Received: from mout.gmx.net ([212.227.17.20]:43585) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ikkv5-0004si-4U for 34343@debbugs.gnu.org; Fri, 27 Dec 2019 03:24:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1577435060; bh=QMrJkI0b5oYIdoO3DZjvtQT/c/SVo5CkBj8/+XU9pRg=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=a2CsE3hqk1j8dnpVuDSEqnrpJ4/VHGiyZRdMmHtej9QKCbaqj+mGmTxNKqTWaPYGl /yG1tO1Ui/VQiSTHx0pv3aHb9dPZV4/jjzvDhT8RWJYlch+/MEbdDQ4/w5KDUuUeFn ryFC41HDEZvEa76NFI5o/ThQEXXQY2Eeil3SmNT4= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from detlef.gmx.de ([212.86.41.79]) by mail.gmx.com (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N3se8-1jkFSG03Jw-00zrWw; Fri, 27 Dec 2019 09:24:20 +0100 From: Michael Albinus To: Dmitry Gutov Subject: Re: bug#34343: [PATCH] Make project--find-regexp-in-files work with remote files References: <9d65284f-7a64-5e9c-ab02-fbbd1be41689@yandex.ru> <87r2bt1tio.fsf@gmx.de> <2cfd53b2-8202-a321-a853-da0c949b0f15@yandex.ru> <6cf8bfa8-3873-d3db-9139-854359027e8a@yandex.ru> Date: Fri, 27 Dec 2019 09:24:18 +0100 In-Reply-To: (Dmitry Gutov's message of "Thu, 26 Dec 2019 16:04:01 +0200") Message-ID: <87h81mqiq5.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:J/cwfL1MR7/4H+p+ocksV7r9fUgvhFEIvdYn79GbZZdsrL5PNrX o+mQNWGr5cErGPYiIhcGMLMQ/C5kQLPW0PTwKOXmvN+dEL+ySw4okqhX3fjrP9BWocABZWk PwrMOy+UFS78d6DZ6xS7Dvcol+EwGcEJYh6uvNfSjcXp+K94u1tBI9IAqI12bhFyL2kxC2m aewZCYlSJqnadJXH5X3Ww== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:lMWvDqPJkdc=:wBHxZ6RAdgHxRUfZUe0RuP WI9J0487HxYjOU719RmqjiXHYlEtZpi8JS9QaQf9CYl+wfs5lO6bvDRgzbdPjnODw9hCA+So2 jheSXZ15Bq54VymzCPO38ZDjZL/TExoaf2R9NNf28KPfABx14dL3JIAppAjXellBNh8T81VXd wrn4rqu4z5WHay4oltaNRfdc5mV8krqNJOlU2h9MWXgR9vVb1GOVDyqpCTlt3DloGwKvwW8JO 3i/j5OVd6rRETAtg6A6bsZiSpOumozO9ctm5tGjGYXJuH19hRcfrw7nmPH6430GjTy7ZM5O7I j5yT+fn7PRb/Bi9UTurNglFs/rF8XNWM38gA4i1M51QDqhu8W0sVqIV1/VxKGFHspvkUguz5i CXd2nx5uvQeg8OU6v82GetGGU7cSBUYIZsG/9amLthCUQBp+14DTP2LDlekYYIjGTWxkEEwvK t+jZTA8+jM6CafiAGdTJxfadd3l8Zv02R+j9aP6MvHYkDOUKqgvSKc0OcI/cauZVwbfLKq0V2 Pdq6M5ZIDRuRdJRCzDCuw0XQcL+sw+Au4WcHmwpU+keuxk98LnjNH5kxUHpOh7R3i9IS+DcNn eR/eQoogxZFFHGb3ht4NeLVV8QKd6Emd5of4p8xAbqbHmb+/Xocmeg7saVg58e39Pzx7i6vDb 5mbidZWSc8q7hYx/8kvfJt6C0sypOJG0QwxvumtNuPTUM+utyXBo011whP4MmDlJSl+wqBthg TMzwQV+LnuVIjdJEKUQO9r4Um5ywkhFWvxps5mV/LLbf+Qkmh0PbPGgAbtij0KUJWyCc38chZ VXss+83Rxrl5cZoGPotqRSJTRBAuf0EwesTYzQYK1EHApp9iLLZwaV68raokocAKhwjnYcc37 ZMoJ/IeogaKH8LWBQIHqIpfUn40RYjp8CUCSkekj8cH0+JXm9fubfX/+zJa3cCLPAYwTqll6Y 8m+szJyEE+t7Y4F0Fydchsb+aSmeX8Zue2Qh3ZjGrkfB1rMLkjwVeTzXe5UXin3R9jm24P0eh hw+UeUz4F37GLXwomJHcHuxenIhyVmRlNzvOFUiK2+pTSclmkXuP+AVCkCQ7yYnNKcD6f2/U2 kAybTxax2E97nKutwOVDMPN2BsynuVkh5OGACXrKWPG7SRY+ilPQqSLrWGs9JY/QqdqbwISbR FxQrW+KNG4vzyXNBZTXwP+D1PYzi77vy3lQ3k/FhjhG09+mrDw+wzSCrKpfO2Ud/sDUoIyeP/ H7hwBfhKoPRGSO4LTtVzdd+Zmdu/NFMQKcLSVTq27CZiN78LUFKEl+Oj6g20= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 34343 Cc: 34343@debbugs.gnu.org, =?utf-8?Q?Felici=C3=A1n_N=C3=A9meth?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Dmitry Gutov writes: Hi Dmitry, > So I've pushed a more simplistic patch to emacs-27 (commit be38e39fcc). > > Felicin and Michael, please take a look. The patch looks reasonable to me. Since I don't use project-files, I can't say whether this works correctly. Your use of remote-id reminds me of comint-file-name-prefix, which serves a similar purpose. Maybe you can check it in comint.el and the other packages where it is used, and steal some ideas from there :-) Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 27 09:19:00 2019 Received: (at 34343) by debbugs.gnu.org; 27 Dec 2019 14:19:00 +0000 Received: from localhost ([127.0.0.1]:56653 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ikqSC-0002Wt-I9 for submit@debbugs.gnu.org; Fri, 27 Dec 2019 09:19:00 -0500 Received: from mail-lj1-f196.google.com ([209.85.208.196]:40045) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ikqSA-0002Wf-5K for 34343@debbugs.gnu.org; Fri, 27 Dec 2019 09:18:58 -0500 Received: by mail-lj1-f196.google.com with SMTP id u1so27223972ljk.7 for <34343@debbugs.gnu.org>; Fri, 27 Dec 2019 06:18:58 -0800 (PST) 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=ewdlryTDYwDhbIJ/pdeOIymVIQEeSeiPAtaM5yKo2q4=; b=i/xha3CJLbPrVvzBdqCwOA6tjdTaE05zJzBdGf1XTanW53NgI2tcjk0clrFuziCUVb LuTLt8HnPzmBLEsQtWvpZtbkz27qpK0tIbHmpYWfxoCpFhbOxUnTHdzasjFr5oHUl4Kp sQmyv5eDlQNB4QZ5h/TpqopBE1+ToMALqyJM9xuLH14JDcI7KqsJE9os1y5Iik7fEN8z Al3j6PUvmCjfKirMsIfnCaT2ElLjOhStega6mwUkYMSaRcWKdRMjhjlGh/vw3dgX/gQr uVe4NsTcdWN/J5yVJst5SyJlKnGrPzDJdXNaXFJx5Slz28BEke7EV2N56MCcCt6B/m9R TDwQ== 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=ewdlryTDYwDhbIJ/pdeOIymVIQEeSeiPAtaM5yKo2q4=; b=qGdIOf1ZCjcB3NUL1PXsics+KN+sMMluuK9P3EU+Sy+xTxLm9b9JgawxRj7IZXfXyZ tJsZMagJMmDD5CQfy+4pnjYb1vhuh/k12tgz/DTUBXa+/HKwE50v3RrmCM4LOi9rIDWS FpcVuwmRU9NnewHuZQCVyzvbiwdER0zasb9MSJjdaVexLm11Vdn0sElqMngoSF3Iz88f ACzU/2DTnTbAcXcSrQZ1NTOieDYe9dJb2uux2BClqyX1QkqbSbRD8lpX0cH5hfnMBNFW OtvqpSq5C/JLtIslZL5jWQHyQ8ef1c7/m7l1qAX1LXKOjqlY9iATa8QHw3my5VGJUQdu O3Mg== X-Gm-Message-State: APjAAAU7bsToDsJE7EQaQ6AHPW0OQjdJeYVXGzhjkOVxkDNR8X2T1TEs 6ekpEyT6s8U378GsYcb4AeOzf5dS+Z8= X-Google-Smtp-Source: APXvYqz+S/2mxm40Ln1Ly9tAO8exJ/wHEIgyDDC4I/39DTnL5tZ5MTpbLCL+b0Ettq9+uuw8OUSyKg== X-Received: by 2002:a05:651c:204f:: with SMTP id t15mr29533965ljo.240.1577456330744; Fri, 27 Dec 2019 06:18:50 -0800 (PST) Received: from [192.168.1.142] ([178.252.127.239]) by smtp.googlemail.com with ESMTPSA id d20sm14577348lfm.32.2019.12.27.06.18.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Dec 2019 06:18:49 -0800 (PST) Subject: Re: bug#34343: [PATCH] Make project--find-regexp-in-files work with remote files To: Michael Albinus References: <9d65284f-7a64-5e9c-ab02-fbbd1be41689@yandex.ru> <87r2bt1tio.fsf@gmx.de> <2cfd53b2-8202-a321-a853-da0c949b0f15@yandex.ru> <6cf8bfa8-3873-d3db-9139-854359027e8a@yandex.ru> <87h81mqiq5.fsf@gmx.de> From: Dmitry Gutov Message-ID: <0ff03b20-20d8-b6c0-c876-3fd525586180@yandex.ru> Date: Fri, 27 Dec 2019 17:18:49 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <87h81mqiq5.fsf@gmx.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On 27.12.2019 10:24, Michael Albinus wrote: > The patch looks reasonable to me. Since I don't use project-files, I > can't say whether this works correctly. Unless it's a religious position, you can test it with: Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (raaahh[at]gmail.com) 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.208.196 listed in list.dnswl.org] 1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [178.252.127.239 listed in dnsbl.sorbs.net] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.208.196 listed in wl.mailspike.net] 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different X-Debbugs-Envelope-To: 34343 Cc: 34343@debbugs.gnu.org, =?UTF-8?B?RmVsaWNpw6FuIE7DqW1ldGg=?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) On 27.12.2019 10:24, Michael Albinus wrote: > The patch looks reasonable to me. Since I don't use project-files, I > can't say whether this works correctly. Unless it's a religious position, you can test it with: M-x project-find-regexp or M-x dired-do-find-regexp (also bound to 'A' in Dired) (the latter since one of my yesterday's commits). For now, I've done some testing myself. It prepended 'remote-id' twice, now fixed. And some benchmarking. While project-find-file (the command actually using project-files) completed fairly quickly with my remote connection (1 to 3 seconds), the regexp search took a while (like 50 seconds) when there are a lot of matches (~500). Things I've noticed: - (mapcar #'file-local-name files) takes like ~2 seconds when FILES only has ~3000 elements. The same code completes instantly on a local machine. Shouldn't it be the same? - Most of the time is spent in 'find-buffer-visiting'. I wonder if that function's performance can be improved. For now I've decided to avoid calling it unless really necessary (so, no free syntax highlighting for Tramp users, even when the file is already visited). Anyway, I also wanted to compare this to what we had before (dired-do-search), and that one doesn't work at all on remote directories. So it must be an improvement either way. > Your use of remote-id reminds me of comint-file-name-prefix, which > serves a similar purpose. Maybe you can check it in comint.el and the > other packages where it is used, and steal some ideas from there :-) Good suggestion, it could be a buffer-local var, or a field in xref-file-location. Or we could just avoid printing it in the group names. The simplest fix is below, but it kind of requires file-local-name to be fast: diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index bbd3940be4..5c38ae910c 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -142,7 +142,7 @@ xref-location-marker (cl-defmethod xref-location-group ((l xref-file-location)) (cl-ecase xref-file-name-display - (abs (oref l file)) + (abs (file-local-name (oref l file))) (nondirectory (file-name-nondirectory (oref l file))))) (defclass xref-buffer-location (xref-location) From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 27 12:57:42 2019 Received: (at 34343) by debbugs.gnu.org; 27 Dec 2019 17:57:42 +0000 Received: from localhost ([127.0.0.1]:57766 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iktrp-0008In-Ry for submit@debbugs.gnu.org; Fri, 27 Dec 2019 12:57:42 -0500 Received: from mout.gmx.net ([212.227.15.15]:53775) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iktrn-0008Ia-RR for 34343@debbugs.gnu.org; Fri, 27 Dec 2019 12:57:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1577469453; bh=hIOfPBIzWuiVRM1JjKBl7AQ1PJhe24rZcH2xToUpoxM=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=An6yFsfDt5nQOOWLpcs4NS4pGMZlrwWK2RaaFYt6xK14rh0NLspiTNeNIcX4mwgcj bP8LqAWoy1glXAAkrsZe0XOUHpVeGqBJ3Pf8nkE9VFY8YyHDeQ+mAwIZn4fCv4BGsU Q/bwT9pMy4NCm4tRTtdW/f6hEYv/CKj+0LV01BOc= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from detlef.gmx.de ([212.86.41.79]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MwQXH-1jawDh3H6b-00sKwQ; Fri, 27 Dec 2019 18:57:32 +0100 From: Michael Albinus To: Dmitry Gutov Subject: Re: bug#34343: [PATCH] Make project--find-regexp-in-files work with remote files References: <9d65284f-7a64-5e9c-ab02-fbbd1be41689@yandex.ru> <87r2bt1tio.fsf@gmx.de> <2cfd53b2-8202-a321-a853-da0c949b0f15@yandex.ru> <6cf8bfa8-3873-d3db-9139-854359027e8a@yandex.ru> <87h81mqiq5.fsf@gmx.de> <0ff03b20-20d8-b6c0-c876-3fd525586180@yandex.ru> Date: Fri, 27 Dec 2019 18:57:31 +0100 In-Reply-To: <0ff03b20-20d8-b6c0-c876-3fd525586180@yandex.ru> (Dmitry Gutov's message of "Fri, 27 Dec 2019 17:18:49 +0300") Message-ID: <87mubdps6s.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Provags-ID: V03:K1:8lGNum3oXqUfTHwzy0TVNp8Vf0wE4RlCb0UDA0WCdrCgA97ThXJ DH1LTcvxvrfLMufggxizfUMJdVQvi21oeeBJZQF3doE3o+A/0Jft7kGfZVAZ+YV4wX0+350 d+4mbQkL+mkhG7ZlGlxiU/iaYNnAzlXJhlurG5y/61Kze/r/FlbaGqeXDodMN5Chb/05eS/ jfYE87kelRtvu4QCfTkQA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:XZDcORWgcB4=:xi0xhDMa+iAitVpU5qgQKh ph5XydbCIqF1AizcoH2SIi44YL2rLkSDQMqf4UIanL9bEztKQE2PLjZNyYaVE9NHjCEjLwXYO hANn/snLpW7TNVx0rEN5Dejmw/rKhlvKZiq/HKfkNSDwCpmLg/1CUKA8karVP6mjYXVCz+UW0 Tu07CTCMwvL9Mhx0VYWPOJGT1chC++GLSfDZ7AnsWNXpKPjqLf4OgRYmVUt6AIq0pVRZDJg7K 6rbp6zVHQv8f/+iPDnito6gnvQUWo+umTVz9xaD7vOAZdVDYVMlP0xGWv6Woub6Rhu/GA/V8/ mtCM7yc44iTKgMLqI4OPPy1NTyg/LPorReYlNZFmXc7x1O07LeA55TAH6wHU3BnTU6s1p4rM0 hGoDQ0dC/DghdfWF37pAnbCHckh1E5cwL2OwiFn4Cm0Z5ZzU6srurAIsiqTnP4jB+1nWj6anK vwwbQ5F/M70ePtwiR32dwuIlFLGysTOFmW0hcfr7xIlDUANl8HsF6zL+Ucmz/zBu+q8lXR/mz zapaCN6rufzqCQThuf4/Zc13fInlv7WPP4admOW0HwhJc9PYeZ+cKRKndcfSj5+fRMKC9Xw4m LTTpn9hjpmAqlHoc4QGaXgsNRGWE/KWvgaciWA7k/ACscTy1R+pplHcstJEFB73UZtzULgooS 1eXcr5/NHdDUHAXlmQiSrJEFwX9PvI3JNrRSDOhANAmpUDRdvJCQLHcB9ycy0f4/Kt7UGyXEQ 2BBxL4vzsQbc4nhq47rBat9sCW/U4DjOz2XE1+BQQrweiiTfDVOKVHbmqq266/mGSm/xxFjyR 8gCaq5MmI+2wfGgfqlVKwYcqJjG+kEXw4DaqOJ1v880SQ/+j/etPD6qN1vLdfIHd8DiTbF4Q2 gED/jO5VT5vM6VqyoInPq/u4HYPC+eulEBNy8b6ffkkXxyHHiWLuUTJ99VaNYPbvv+qlENLSG wseVKw59wOVKAfQDKGp2FG13DvpeCnFGY+Efb6/p463VT2iEuOZTPy3o/wnIxiVxXDPvwvzK6 dw73OrZE6utSIZTTZrkIikmhmBgJgTm6RlL5bvJRneIUfnEYCJhHk+/X2v2HVXs0su10Xr0+C gbfzYMQ5+i7ynQir+l/7xZ2OluyBTMBuHZ611Jz1JpNGDOcidzQQ19kYLvq0bOdcGdJYoIz5i LqhvUN6fOF0AzxNQWkEI09wTcFFdNcpqSuUpJzb2DShxjTrkODLMg9t3meB+HDeFVWSr456fY 3aDHbrDW7S6U4ismgl88AY/sNJcpgAHBTK4lo4IEq03LOcZD9eJHBjIkf+g0= X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 34343 Cc: 34343@debbugs.gnu.org, =?utf-8?Q?Felici=C3=A1n_N=C3=A9meth?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Dmitry Gutov writes: Hi Dmitry, >> The patch looks reasonable to me. Since I don't use project-files, I >> can't say whether this works correctly. > > Unless it's a religious position, you can test it with: > > M-x project-find-regexp > > or > > M-x dired-do-find-regexp (also bound to 'A' in Dired) > > (the latter since one of my yesterday's commits). No religious barrier here :-) > For now, I've done some testing myself. It prepended 'remote-id' > twice, now fixed. I've tested with the emacs-27 branch, and it seems to work. > Things I've noticed: > > - (mapcar #'file-local-name files) takes like ~2 seconds when FILES > only has ~3000 elements. The same code completes instantly on a > local machine. Shouldn't it be the same? file-local-name uses internally file-remote-p, which calls expand-file-name if the connection is already established. Not needed in case of local names. Could you pls test the appended patch, whether it improves performance? Best regards, Michael. --=-=-= Content-Type: text/plain Content-Disposition: attachment diff --git a/lisp/tramp.el b/lisp/tramp.el index 0dbbfa59..a25b2715 100644 --- a/lisp/tramp.el +++ b/lisp/tramp.el ;; This file is part of GNU Emacs. @@ -3361,10 +3361,12 @@ User is always nil." (let* ((v (tramp-dissect-file-name filename)) (p (tramp-get-connection-process v)) (c (and (process-live-p p) - (tramp-get-connection-property p "connected" nil)))) - ;; We expand the file name only, if there is already a connection. + (tramp-get-connection-property p "connected" nil))) + (e (and c (not (eq identification 'localname))))) + ;; We expand the file name only, if there is already a + ;; connection, and IDENTIFICATION is not `localname'. (with-parsed-tramp-file-name - (if c (expand-file-name filename) filename) nil + (if e (expand-file-name filename) filename) nil (and (or (not connected) c) (cond ((eq identification 'method) method) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 28 05:21:14 2019 Received: (at 34343) by debbugs.gnu.org; 28 Dec 2019 10:21:14 +0000 Received: from localhost ([127.0.0.1]:57970 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1il9De-0008UW-Cf for submit@debbugs.gnu.org; Sat, 28 Dec 2019 05:21:14 -0500 Received: from mout.gmx.net ([212.227.15.19]:48541) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1il9DZ-0008UE-QP for 34343@debbugs.gnu.org; Sat, 28 Dec 2019 05:21:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1577528463; bh=4+/WykvU7WDpPR+kyB+eJtQvyqPd6LignLK0JNtheVQ=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=HyBhTlqzq2mZ2ALqiry2/wvfTid6lmKkOAZ8p5U/72sR9F+OyJeMBTpuqkU8rxyCJ C31iUNMSq4o+foN6GklJhDgjYqCEpns+L4WFwfTDXJe4Z2NAJ01vy0cqlBGiXZTPtK edLL1+MPZ2oJcmL49eJ6DPHOdwjV69jweJP3UZO0= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from detlef.gmx.de ([212.86.60.58]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MuUnA-1jbbPY3wSg-00rWjw; Sat, 28 Dec 2019 11:21:03 +0100 From: Michael Albinus To: Dmitry Gutov Subject: Re: bug#34343: [PATCH] Make project--find-regexp-in-files work with remote files References: <9d65284f-7a64-5e9c-ab02-fbbd1be41689@yandex.ru> <87r2bt1tio.fsf@gmx.de> <2cfd53b2-8202-a321-a853-da0c949b0f15@yandex.ru> <6cf8bfa8-3873-d3db-9139-854359027e8a@yandex.ru> <87h81mqiq5.fsf@gmx.de> <0ff03b20-20d8-b6c0-c876-3fd525586180@yandex.ru> <87mubdps6s.fsf@gmx.de> Date: Sat, 28 Dec 2019 11:21:01 +0100 In-Reply-To: <87mubdps6s.fsf@gmx.de> (Michael Albinus's message of "Fri, 27 Dec 2019 18:57:31 +0100") Message-ID: <877e2gpx82.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:jzuCr6oOxp0fviyj8i0r31S8DNXRN4CFYxdNBqTbNkqOeK+7OPv K1oADDuXApkGOqSb/46nU9L5yVHluoR9Y0WZm/NRlnrlaqcAAFXZ7AWTXP0h6zhkNmjKOfC yzIOT13PrtyzEyUiRshX6L//84kdZ4EJ8om1eGV+dO1kwDYRd3vixbCgrnSOgR7oLifvs3o hb3yswa54vhZGXp8dQrSg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:tWMLw0Ai9Io=:WCpzBqbg2g2j/hr3VEvb+m mk42uU8iTuK3msERIveSAsgJPWNBJq2+eMsSm1lUY/XY5HDi25dcy/xw13Xh5/nZf6YrjbDgd 0jFd3nvPfxucErJhBo5SFr879lsDdhtCnpE5BauYLbzEay+AufSTXbsp5UuNTbYgzYmNkLApG 7mlampxDuauPOGp9Po3cEk6p2bQdRpEbnspoBaYNusbpfGXaBtqbaASQCStwbdsomN2Qz53hr zrF5EknHcMmJSI5+HYvle76f55LJfvMgfpYMKT2jKN1cwgf0HEg5I6XCve8yag5fuw2Is1OPi PsGYQvmwmgT4GMHPu1+w/gHRExCrCa9dDYREeTfFMQW33Jph0erkp5j5677+k/2GwbvKjuhuC Y8g462/AZexc6Wrah4FifeVho3hetNPiGmsVdV+kCSKcMWLVyUyKmP7W926SulU1idh+C5O4r KuAbqWf3TTpwWPHfzffbWkG7eN0gquwjkEr100SFenroHFvK20S+EoKglp7LgyrlY2mJgkXra jPyzDphzyLpCLGp6Bidz99kbfPLLTdPLghsnY3RYxr9gm7Xi+EvrgDAc2P9mCNr/ZOJX5HJMH 3/OOWvbDRVX/PSC+O3rYAVB4gzJpCMihukfXX+qGxGre1R9q/dWFyT/QeHUy6Ukshjxs/t2U3 P27xMDWIXqPhvQkvzwFs4ZoUDOcj6B4C2+HxNKPWEjj6sRqYBCjhujg/JsI2dbz3JCWa3O4wY 6j6V138QQjxKcgkILFtpxfKmkWulgt8pvngrwSbZzm3kJ+78mgmyYTEhK1z2emA6nCvyxqxXw FMiQBZAKWFVtY/7LomaiuYUMDEYF4EPJWZw8iwaNHH/MfqXNESuYXZ5oG9gG8Z6q3owEXp/Jb dAExbyE2WmI7+5YWkQNLBMQ7658anumzb1DCP8uz0V4i/Riyg1ejJa+fU8xKsicfPiJ6lQtEW mpvMYrgG6JGytLkXM88hJldOW2eWOusikYMWJ+f63neuWbaOVa8irl3xX5HP2oqDF2u929M38 LjpljWI0hlBYdoq9tZkYc9iQlYiHbauArB1fMSoPHUVKabG2/OhzwEB1SYitA9d0tYDtYVuTi S5nPBZRsJ8a3GjvQkjIbBliuUCvMyWPqSro4uvILa8rafAP1bds7loA/rj7B206BYoqQ9eNiI 7kATC3J7BbFmQDvyvlCYAevS1RCMhGrCbq8y/bt+vq9UPtc28nty67lv7wizz7MT/eWIuOpfc HTsmIYjgriRguKfc1AUpuIXKL43qsJ1V69FVd8J+Q3RYAs76O0QCpTKQcyFs= X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 34343 Cc: 34343@debbugs.gnu.org, =?utf-8?Q?Felici=C3=A1n_N=C3=A9meth?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Michael Albinus writes: Hi Dmitry, > file-local-name uses internally file-remote-p, which calls > expand-file-name if the connection is already established. Not needed in > case of local names. > > Could you pls test the appended patch, whether it improves performance? Please forget this. I ran Tramp regression tests over night, and some of them failed due to this change. So we need a cheaper file-local-name. Just checking for tramp-file-name-regexp isn't sufficient, because the file could be "remote" independent of Tramp. Let me contemplate about. Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 28 09:46:17 2019 Received: (at 34343) by debbugs.gnu.org; 28 Dec 2019 14:46:17 +0000 Received: from localhost ([127.0.0.1]:58040 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ilDM9-0001pg-8L for submit@debbugs.gnu.org; Sat, 28 Dec 2019 09:46:17 -0500 Received: from mail-lj1-f182.google.com ([209.85.208.182]:44571) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ilDM6-0001pS-PQ for 34343@debbugs.gnu.org; Sat, 28 Dec 2019 09:46:15 -0500 Received: by mail-lj1-f182.google.com with SMTP id u71so29376543lje.11 for <34343@debbugs.gnu.org>; Sat, 28 Dec 2019 06:46:14 -0800 (PST) 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=cRvQFyFbcQzQB9zR7Vg39LkQue1YxuEDikkSsY+05+4=; b=XBGW2CvqAWz2PlbBHLVNvVLtz1HtiY54Zp8RfxjVpwK4SmggDwjYTUxZWAMfeffp4Y biFoxFJawWxTJJQEp1pNIzpdeDxD4YYXjiEnJ7H8V0aAnpZSbG63ZM4KJaE1rKmxuhx3 +1ZriHeT5GfVpAf7qpCLNZ1kfZBGubEAooc34Gu3KWYzt6sMnkocd1sLNuMHHWNpK9fG jCVg0VMtpMiJTZsajZfcu6Vgx5nC/vjGihLNFhqPuX5pqJhiNRssQdrv2v7crlBx5rJI qiwZI8pNhVrARgD1+NPQp7mMwxmZqIghKXFK+oL2tEo6x9ckE0LKo68/lt18YeQ0b8BC 555g== 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=cRvQFyFbcQzQB9zR7Vg39LkQue1YxuEDikkSsY+05+4=; b=jQYvOFPBnO1muQPBqmSgptYCaiV43l11j/d5wOI5z38wX4N+uaRW9bV7thTYdl8aYf FxfBe8T8pPWiMrLPXq3oA58Hxev27AfWeGgRFc5hBPUloQgB9qt+mIbmGqipFTASwDad 9n9tEFfaLoyZsL38VrxdzETU0yt5wOVVCX/IeVuNjAjf29wWnuQG26GlfILhl3DyuT7w 7RdzxMKie0u4Xn2rSndXa0pTNHk+D0xxyZbDz6tf2j9P0NecAxOIpwrWJfaQXk+3Hd5L weCdycfXcp1KNBWSlE0wHxj7gJyhxpzPvzMtrxt7/AkDiHnu70RyE6QwNV6BPDyZ5u7S Oybg== X-Gm-Message-State: APjAAAX5/y9DXCVtRg2O48qH7zaHty+Zthnjbw3T5xLmQL/e0q6z0T+m P0Waxi2cAFo+QSO7FajUjpB4KO3lm50= X-Google-Smtp-Source: APXvYqwoKTGdCuC86PKkV2JM0NaikowKALfaR5EitY4XABQv1kD0Pfiw9ybjqULr6LVx8pPlxLoJrQ== X-Received: by 2002:a2e:9587:: with SMTP id w7mr30020008ljh.42.1577544368435; Sat, 28 Dec 2019 06:46:08 -0800 (PST) Received: from [192.168.1.142] ([178.252.127.239]) by smtp.googlemail.com with ESMTPSA id i9sm16068691lfd.6.2019.12.28.06.46.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 28 Dec 2019 06:46:07 -0800 (PST) Subject: Re: bug#34343: [PATCH] Make project--find-regexp-in-files work with remote files To: Michael Albinus References: <9d65284f-7a64-5e9c-ab02-fbbd1be41689@yandex.ru> <87r2bt1tio.fsf@gmx.de> <2cfd53b2-8202-a321-a853-da0c949b0f15@yandex.ru> <6cf8bfa8-3873-d3db-9139-854359027e8a@yandex.ru> <87h81mqiq5.fsf@gmx.de> <0ff03b20-20d8-b6c0-c876-3fd525586180@yandex.ru> <87mubdps6s.fsf@gmx.de> From: Dmitry Gutov Message-ID: Date: Sat, 28 Dec 2019 17:46:07 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <87mubdps6s.fsf@gmx.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On 27.12.2019 19:57, Michael Albinus wrote: > file-local-name uses internally file-remote-p, which calls > expand-file-name if the connection is already established Why? If the caller needs an expanded name, they can call expand-file-name themselves. Or if they need an expanded local name: Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [178.252.127.239 listed in dnsbl.sorbs.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (dgutov[at]yandex.ru) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.208.182 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.208.182 listed in wl.mailspike.net] 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different X-Debbugs-Envelope-To: 34343 Cc: 34343@debbugs.gnu.org, =?UTF-8?B?RmVsaWNpw6FuIE7DqW1ldGg=?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) On 27.12.2019 19:57, Michael Albinus wrote: > file-local-name uses internally file-remote-p, which calls > expand-file-name if the connection is already established Why? If the caller needs an expanded name, they can call expand-file-name themselves. Or if they need an expanded local name: (file-local-name (expand-file-name filename)) Aside from performance problems, this feels like an inconsistent behavior. > Could you pls test the appended patch, whether it improves performance? In any case, this didn't help because in my main scenario identification=localname. Whatever that means. From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 28 09:48:16 2019 Received: (at 34343) by debbugs.gnu.org; 28 Dec 2019 14:48:16 +0000 Received: from localhost ([127.0.0.1]:58047 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ilDO4-0001sv-CU for submit@debbugs.gnu.org; Sat, 28 Dec 2019 09:48:16 -0500 Received: from mail-lj1-f175.google.com ([209.85.208.175]:36401) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ilDO2-0001sf-J9 for 34343@debbugs.gnu.org; Sat, 28 Dec 2019 09:48:15 -0500 Received: by mail-lj1-f175.google.com with SMTP id r19so29382678ljg.3 for <34343@debbugs.gnu.org>; Sat, 28 Dec 2019 06:48:14 -0800 (PST) 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=PY8wwfGXuv8grNMemmsCPIi7LCUTpzQ4lekBNQQr4Ak=; b=pa2JGyGUfZJrQ4roWXXpcFHnFXVdnonL8VX/RG1C+Xs/A+GLdluOMPUxRz4PpBZG0E 7vCVkzyaBVdFO3eAysks/CiDb6hJH9YNSksLyuWioZjKy5K8VJKzelIpN+0hfD+N+7Vn a/0soTY1uGLWI3fvHGEeNNUl23vUQYv5V3L0tLdWE/yO8J16KoeGWW8E/lmcdGPYyFcA /CEXtAjXIkJ+t55AzpY7y+3KZeBjEQOFq3WtRboqDiWyNra0pZ9zY21WVi9RKnOlqxoc phDp2sjPqdK40UvV9CTdqbLUwZSTgZUNhe7f71h2UmEcO+dcTKa8FQ+I/rR5fbTlgdlA 60NA== 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=PY8wwfGXuv8grNMemmsCPIi7LCUTpzQ4lekBNQQr4Ak=; b=bMxSz4hGZNfJwwsY0VUbOB7/TzMmqDn67PQBBocGDcjC0EerL6r9eStFjFeL4CAMPA rKr6jHFFmE6Bz71QFjSZkWdhC7Yu904ZAapqZtruCG5ZXzDdxnctJc7LVsBMACY0a1xw CSXNV715864kpodBFBb9kngjm2MudH/RHO05iLSle4hGzwUVH/PSn2jw7aEiXMDSoCaW bP5TQ57xaE7LDw6T6fARMLwyjrUD40RNzlh7F0bUHZ7/HpmqV+Uy4XxcxxoKk1Bt+MHB eIDaxhR7+Orbgs49av8ZGClVJqA9nnPak5LaH+PnT6/dxXMQpSBo95SVZwbcHoVVxmd3 G3vA== X-Gm-Message-State: APjAAAXbaUHiW23bpHjKIJuRQp8Md4+ekWlhROqxJKVEWFaZ+X6Rvp2V DYUKejL0J3s09aFuQm5zBfdno75hoII= X-Google-Smtp-Source: APXvYqxOugUf42C1Zu4GugBt7+LSp+hIEKvfz4xE9PYA3Qwl42fnzHuXOARKR9ILY5r6bxtAdQkfbA== X-Received: by 2002:a2e:844e:: with SMTP id u14mr31539857ljh.183.1577544488655; Sat, 28 Dec 2019 06:48:08 -0800 (PST) Received: from [192.168.1.142] ([178.252.127.239]) by smtp.googlemail.com with ESMTPSA id h10sm14756819ljc.39.2019.12.28.06.48.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 28 Dec 2019 06:48:08 -0800 (PST) Subject: Re: bug#34343: [PATCH] Make project--find-regexp-in-files work with remote files To: Michael Albinus References: <9d65284f-7a64-5e9c-ab02-fbbd1be41689@yandex.ru> <87r2bt1tio.fsf@gmx.de> <2cfd53b2-8202-a321-a853-da0c949b0f15@yandex.ru> <6cf8bfa8-3873-d3db-9139-854359027e8a@yandex.ru> <87h81mqiq5.fsf@gmx.de> <0ff03b20-20d8-b6c0-c876-3fd525586180@yandex.ru> <87mubdps6s.fsf@gmx.de> <877e2gpx82.fsf@gmx.de> From: Dmitry Gutov Message-ID: <352cd6cd-7262-58d5-bd79-0c9ba847317a@yandex.ru> Date: Sat, 28 Dec 2019 17:48:06 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <877e2gpx82.fsf@gmx.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On 28.12.2019 12:21, Michael Albinus wrote: > So we need a cheaper file-local-name. Or a change in semantics for the existing functions. Which is riskier, but... *shrug* > Just checking for > tramp-file-name-regexp isn't sufficient, because the file could be > "remote" independent of Tramp. Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [178.252.127.239 listed in dnsbl.sorbs.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (raaahh[at]gmail.com) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.208.175 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.208.175 listed in wl.mailspike.net] 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different X-Debbugs-Envelope-To: 34343 Cc: 34343@debbugs.gnu.org, =?UTF-8?B?RmVsaWNpw6FuIE7DqW1ldGg=?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) On 28.12.2019 12:21, Michael Albinus wrote: > So we need a cheaper file-local-name. Or a change in semantics for the existing functions. Which is riskier, but... *shrug* > Just checking for > tramp-file-name-regexp isn't sufficient, because the file could be > "remote" independent of Tramp. Why does that matter? Why should the local part of the file name be different depending on the transport? From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 28 13:46:16 2019 Received: (at 34343) by debbugs.gnu.org; 28 Dec 2019 18:46:16 +0000 Received: from localhost ([127.0.0.1]:58901 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ilH6N-0007fJ-5b for submit@debbugs.gnu.org; Sat, 28 Dec 2019 13:46:16 -0500 Received: from mout.gmx.net ([212.227.15.19]:34493) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ilH6K-0007f5-OT for 34343@debbugs.gnu.org; Sat, 28 Dec 2019 13:46:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1577558766; bh=n/2hVLh5NYuKSZ3SxIwl4Em7iIdpbVUrt/7TnsqkQXw=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=ZoMpQLrF6LXiC3J6u+56DBZTxlDn1sTpqDaXpdVN4ZRASBzcQsrNLDIMeO+4ntMH6 oL1WgR0YMT+4u8JDZMbjwjbUFq98s38unI/1tXq2AXSABoGHkQq44KpCA4vEyXfY0c xWY1fjsWTml6/+RESzjwMHgk1Z3jOUCPYi0xX3Iw= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from detlef.gmx.de ([212.86.60.58]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MsYqv-1jdNt03m8p-00tzjy; Sat, 28 Dec 2019 19:46:06 +0100 From: Michael Albinus To: Dmitry Gutov Subject: Re: bug#34343: [PATCH] Make project--find-regexp-in-files work with remote files References: <9d65284f-7a64-5e9c-ab02-fbbd1be41689@yandex.ru> <87r2bt1tio.fsf@gmx.de> <2cfd53b2-8202-a321-a853-da0c949b0f15@yandex.ru> <6cf8bfa8-3873-d3db-9139-854359027e8a@yandex.ru> <87h81mqiq5.fsf@gmx.de> <0ff03b20-20d8-b6c0-c876-3fd525586180@yandex.ru> <87mubdps6s.fsf@gmx.de> Date: Sat, 28 Dec 2019 19:46:04 +0100 In-Reply-To: (Dmitry Gutov's message of "Sat, 28 Dec 2019 17:46:07 +0300") Message-ID: <87blrsz3tf.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:cIGVXpi+1Iq20xxQaOK3oI+cbFb2da/IUFax1b7DHWdT8ysxJGB PHBnKLNytbZ+aHY4/rrvHvftzQpSjW1hQFCSXzZX2Lh0saOIzMKNWXzUTv9HvO999aUUy3+ aeSFjpGmTBy9sDfZ6RenD5Ev4o/p6fN6qojcIGOzU6xXryQq1ldCJkb75k4Px6gsUootLv3 imNdGF1gWOPJEX4WVPDPg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:jTWC87FkmQI=:njlVrPBppzwRasodFcZRbI DJw1x1m9bPSOVb9aSE9a6Ivw7yxnWSR4D06M6/wa98YQ5Jh5KaN8Fcro2qv0AP/8gtucoRgCS dN8Paf8J3C9X96NHqYFco5d0DbMQ5rWZqlsBMipsCGfFgVqlSABHKjsPmhaNJwd5W5kjHtcoy ZIwZdBJjKlEGNzrxxCU/6Wu/tql4nu/8Dibgnom0tCKvV6n7bsFMgKUUFrm60Ab2u/wssjce9 b5DY5OHrIUycVPqZPtLBguSiIR0mg7z78BaO7Kl0mO1hBwcsA2Cs877pdQLlUnkkJZjecb/LQ auuPJuRSzeONDy6gTx2kvCUfCF7k7rA//ZniI8tLUtby7sQVj6rT+OpG4JQr3fdLXkvSTzSxY RQjbhANVFaGQ537twuF+4xpb+vMwgBEqF61xfqHotv+ThHgXfNN+ZLYMy0yKSIksSZ9REdRxs vsHGkgLRTJxwd8jLwdbck/+5SCJPc/MTtwZMDAxHc/A34uMnQH2t7Sz6QvAqjhdSF6XKGOWD+ vJVM+vBJcKONBEY8/ve+LR/IyDi817U+MI82Kvm6Xj0SFV4YInNRSYGQO9r7hGvLQJQ8RuuFP nQVrd3U5NzNfSWj0fio6LJLYOEPYEmZ6jiDjij5sxN9/OnwIDSmpmJ6oYDjRtYekCwiE2Hj8M r4FHOw/hEpV8RsIVQrjsxEGLTgEZe3ERFT/tY9F1ZbQYzebAFgIzss3pEYLwVQnb0uQVQLzk5 5k1KTbuzKf6CU/Dk8sWTLb3TN/OjKzryfydxonsdAS+ehgraRw/K+IyxOiHJwM7a4e5UNcd2y cg/rkdVfbhnIZywXygyb7tEFZI2oI1Xkm9oFsqyfa+T1uLzCmBu4OHBgGa9YS+Qu0eTJJTeUu VqNvYQPSK3Tkn9drQsnss8QDu+OxTVBqhWMC3W4yIgKcQ9PcOrvBk3S5xsVwkZbJA/VrIOLd6 1G92rq+xV2Qqr71vcstNfrfqzsQ/M3pgsp6W/w/seLXolPDQPMvrsplAgid7SPoXsPCc9Ijhy oWjoqqNsv0DxRkLKaJuFwhRMFX8N+J79xcJwAOaERQy+hiaIJ2M31/qk7+yzyTg10DL8JHMXa qcVpmkCSMamt/QLmoIQe0Jcan3xuvXJZb2WHqlD7BgjqvzepVBG1R407sEDfRS1wnmJkC/EaA PeT+b+BTUAOxiBGgVJs/WF4ovd1Ci89WtZTv+AgfLumFEoZISnMaOTCHtagjvJ/Yoc31cIyMp AtiN31WRoL9wEVAGPqIhOFackxCsaOd0RHEI6CG++Udbx1Hd/4/DUwUwJh6M= X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 34343 Cc: 34343@debbugs.gnu.org, =?utf-8?Q?Felici=C3=A1n_N=C3=A9meth?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Dmitry Gutov writes: > On 27.12.2019 19:57, Michael Albinus wrote: >> file-local-name uses internally file-remote-p, which calls >> expand-file-name if the connection is already established > > Why? If the caller needs an expanded name, they can call > expand-file-name themselves. Or if they need an expanded local name: > > (file-local-name (expand-file-name filename)) > > Aside from performance problems, this feels like an inconsistent behavior. I said already, that expand-file-name isn't needed for file-local-name. I will try to find a better implementation. From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 28 13:56:11 2019 Received: (at 34343) by debbugs.gnu.org; 28 Dec 2019 18:56:11 +0000 Received: from localhost ([127.0.0.1]:58911 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ilHFz-0007sw-Ey for submit@debbugs.gnu.org; Sat, 28 Dec 2019 13:56:11 -0500 Received: from mout.gmx.net ([212.227.15.19]:39623) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ilHFx-0007sg-EK for 34343@debbugs.gnu.org; Sat, 28 Dec 2019 13:56:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1577559362; bh=w74XT4nhKCbn+xULSe+avn8yHbDRGWzmV1cflaKh9gM=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=Heyb5AM78wSZAZUBfjyivhqijUGusj/FfVR9X4POahIh6zrwx7BdpT4aHAQo1aGNQ 4Sj6GSY4ZnxZMQP5wN8rmDcPOPY0jLizcSUZNvrWvt/61rtiVTkadjbJkl1pDaFzPe ATG0TIIFwOqbG7F8W/IV350pH4YoqjdRUrXp4PaA= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from detlef.gmx.de ([212.86.60.58]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MN5iZ-1j1Z3P1qhJ-00J0rf; Sat, 28 Dec 2019 19:56:02 +0100 From: Michael Albinus To: Dmitry Gutov Subject: Re: bug#34343: [PATCH] Make project--find-regexp-in-files work with remote files References: <9d65284f-7a64-5e9c-ab02-fbbd1be41689@yandex.ru> <87r2bt1tio.fsf@gmx.de> <2cfd53b2-8202-a321-a853-da0c949b0f15@yandex.ru> <6cf8bfa8-3873-d3db-9139-854359027e8a@yandex.ru> <87h81mqiq5.fsf@gmx.de> <0ff03b20-20d8-b6c0-c876-3fd525586180@yandex.ru> <87mubdps6s.fsf@gmx.de> <877e2gpx82.fsf@gmx.de> <352cd6cd-7262-58d5-bd79-0c9ba847317a@yandex.ru> Date: Sat, 28 Dec 2019 19:56:01 +0100 In-Reply-To: <352cd6cd-7262-58d5-bd79-0c9ba847317a@yandex.ru> (Dmitry Gutov's message of "Sat, 28 Dec 2019 17:48:06 +0300") Message-ID: <877e2gz3cu.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:hGhwRw9wTpvLiWR9o7w0PPbLfgyC8Vlfcyz77LJfQqt1CWvJZKt q6pBRHKmcV9hWuRiqHxwL++9enDE0YoJ9a7+60z/Bl927q+sM1aJm7YM9SQDDo2jF/3qxxJ xTECziGAMMsqgn2lbLDpUtfG6fj/a4SOUAnIBtPCMB4jSqDpilbN9OR6ZSdjd8QZUcJAcKR DGb9oWrGFGxXT9JdlK0lQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:OemKDabLN5s=:GEke1Yq0hSbuK1G3MJcgZG eVL2HJzcgS64PZVxvwu5/wKQ2M8Ec+WoWEsTWxenPUOc3JUpM5vtDp3rPsPPOLANWMPmW1+Ro 2rZ1BakGCM+kUzh2+KZyneQxclQYc1GY57RhiKu9Zq29o6qmrYMu4h53PKXz6FtfygPaWPdcP ocIq/jz5AkYGR74qAslIkIn5ICnojfPbSIOOHySj2wsr/X0IKqCq7PSm0cIX7AYMG59HvcNDU aYrCfh4A1yZI9eYeg3+RlhhZ/UakLrVBzs2I6nIuN9Bivuolpi0vpHS839PfT7LrJHrfaz11Y vHqSlzZrgfvpHE0VUp4OsjEdJPz6SkrdaEP6OfvjhpucKNVRMxnPGbFbJ56REIINpVPFT67xb ZvHxuZTb+eq9djBNV+EC6k2PZn4B0DPJYU730XcjltFLKpvpHUWWKUBs1naSz9tzWb91INhNc sTNL9GtFLbbDW1QiTGS4ygiT9m12QnuKpl88k/SkcjdIFQnPvUWrxbNgj+RNcVIMIVD5A2ACr ktHDoSKXc2dgmZAl0H0ELzDk0yXa1F7b+mDWmCBvsvMKIwRmneXNEFU6c3w80ycgVweN4V4lw DTKmEJhubDEv6/t/kGhn215r8WA2TruU3qLhE4Pqei8Y5dtq5M9+owbbHvy4Hcb5IoX77lIta 8cZj7+cEHWmpWXn5syQsfZnokRbP4qHqIozVO/hn24kIx9pe1r2aBH7Jp2klSltaNeKnTFGe5 Fko9zk/Tn2mpqz24eXAk8tZ/oQV3tZBRVam1MzU9mzDcKw+mnV7eXHKMv2ZxeiTqyNJajo4Q6 +eJQ4ypQeoqJdcSLr42DjWwvor6ZxiWcrHZxfMTvyEmlWIlyAdnIFnc9u255QyVjZQj3sfIzm paJnSCqh7jiEe0f/pCgDIbXZxKfA0AEqESHn1OvzT2YPED8GE7kXGzmlppPao6QsnoWo+r/l1 Omc2w9IuH7wNQubOXJWH4y67QRpreSVN7VbWLRlpKJOAUl3HDXQnCx4dK7D6yQSunlryunCrA /IdYHpOU6Gm1aPDhCIJPx4diO0jdtzKMHznpiFLq1B3dJ3GxN+2/h+OvCRypzQ1pUSo33YMPk XuNWvX6djNUUzbpkQtNa8qAwsE7bsnbo/myh9V3s9GSTUNMoNLIGJ18gJLBZMhOXq3icBQeVa 2CuXO3WzLhN8MKAn/thGCcRaSOACOR89L2BzcT76b9FotrIzTezqcUiLi3alqjn6s7F4IPc41 Z/7CrPRwDvDTtMAT35/KDvelUxPWuiJga+iMO3aXVpwmXXGG735aD5A4kd2A= X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 34343 Cc: 34343@debbugs.gnu.org, =?utf-8?Q?Felici=C3=A1n_N=C3=A9meth?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Dmitry Gutov writes: >> Just checking for tramp-file-name-regexp isn't sufficient, because >> the file could be "remote" independent of Tramp. > > Why does that matter? Why should the local part of the file name be > different depending on the transport? file-remote-p doesn't exist for Tramp only. For example, there is also url-handlers.el. Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 28 19:15:29 2019 Received: (at 34343) by debbugs.gnu.org; 29 Dec 2019 00:15:29 +0000 Received: from localhost ([127.0.0.1]:59106 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ilMEy-00078y-Tb for submit@debbugs.gnu.org; Sat, 28 Dec 2019 19:15:29 -0500 Received: from mail-lf1-f49.google.com ([209.85.167.49]:43588) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ilMEw-00078X-Si for 34343@debbugs.gnu.org; Sat, 28 Dec 2019 19:15:27 -0500 Received: by mail-lf1-f49.google.com with SMTP id 9so23076196lfq.10 for <34343@debbugs.gnu.org>; Sat, 28 Dec 2019 16:15:26 -0800 (PST) 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=zA0WgBg73C928T/eCiSUVohi+p79hgJ0Eg1rVzteJBc=; b=qyrkzjhVjjS4z8Gd97ltgO3pAth8bfniRO9nUykThpZZkmeN6scJ42tIypDjN/VkFW uL8uAYEev0retlnrRiyvPlsFT5cPw74rwuE1LKyU0O+Cau+AzlgzXMFJSzJHX7+7iWJp fcgQBZOe7t4nTJM/1xODKV0S/X8k8T6CjSN9u3F7gmXVFY1iEiudAWUk7a4OvO4HjAGv LP8oP3kWkPJfiSVErtgrkmxss2kO1r70MDqN5F5S3ERzgCT6EzTIb0xRNpsyAP7hXfJo vCzFYt8hCNdt5AVtko8HJbhu+w319mL83MHhdW5NUH+UB3DotsUGiL/0t2s+OpgoOje/ RjIQ== 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=zA0WgBg73C928T/eCiSUVohi+p79hgJ0Eg1rVzteJBc=; b=ezTFth/CxxhK9DvcBryRgWdKSzoyBvYZGW7YueA/YkZYfj3Z8pN81BRJbZ6/nRcQKJ Jdrky6oQOLbMdQ98GQud8qqaM29QRrHsEzQr8udNXrK9sd1nmDk+6Zxx08eXVyoIq4WU Uq/LvRcw0AyzkbGOldM0cguSWbUlOYs7uWEsJaoUcabM1/5g7SLm3CU5ghBimc742jcM 86u3wW3D9qJN1ZyVtylSyvuRhU0BeKJuZEz5Aw9fK2e09fMqOkhJIpTZES17nIp6V18o uiL581Rs44EQ46ho/W+68GOMlSiJ3mi9dlxNohDwUcWAx4TmIOwVQ5e2pn9faXbhga+E gr0w== X-Gm-Message-State: APjAAAXySYrfcsgg+1JWUv/ZSETnJKBZngGCRlJpHyAo14nIJo3RjNd+ 99flYf0b7DDgHxCsKOaAVjPjH0hVVmM= X-Google-Smtp-Source: APXvYqzTeVJJ+241/gd1tEzk4POE0BD4TW1IOtD11YwfWImtMA9nMjR/uayPCLeUMzGMqcFuy++ZlA== X-Received: by 2002:a19:3f51:: with SMTP id m78mr34341680lfa.70.1577578520726; Sat, 28 Dec 2019 16:15:20 -0800 (PST) Received: from [192.168.1.142] ([178.252.127.239]) by smtp.googlemail.com with ESMTPSA id l8sm9125339ljh.65.2019.12.28.16.15.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 28 Dec 2019 16:15:19 -0800 (PST) Subject: Re: bug#34343: [PATCH] Make project--find-regexp-in-files work with remote files To: Michael Albinus References: <9d65284f-7a64-5e9c-ab02-fbbd1be41689@yandex.ru> <87r2bt1tio.fsf@gmx.de> <2cfd53b2-8202-a321-a853-da0c949b0f15@yandex.ru> <6cf8bfa8-3873-d3db-9139-854359027e8a@yandex.ru> <87h81mqiq5.fsf@gmx.de> <0ff03b20-20d8-b6c0-c876-3fd525586180@yandex.ru> <87mubdps6s.fsf@gmx.de> <87blrsz3tf.fsf@gmx.de> From: Dmitry Gutov Message-ID: Date: Sun, 29 Dec 2019 03:15:19 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <87blrsz3tf.fsf@gmx.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On 28.12.2019 20:46, Michael Albinus wrote: > I said already, that expand-file-name isn't needed for > file-local-name. I will try to find a better implementation. Sorry, I guess I misunderstood you, then. I thought you meant to write a new function, "a cheaper file-local-name". Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (raaahh[at]gmail.com) 1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [178.252.127.239 listed in dnsbl.sorbs.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.167.49 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.167.49 listed in wl.mailspike.net] 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different X-Debbugs-Envelope-To: 34343 Cc: 34343@debbugs.gnu.org, =?UTF-8?B?RmVsaWNpw6FuIE7DqW1ldGg=?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) On 28.12.2019 20:46, Michael Albinus wrote: > I said already, that expand-file-name isn't needed for > file-local-name. I will try to find a better implementation. Sorry, I guess I misunderstood you, then. I thought you meant to write a new function, "a cheaper file-local-name". BTW, does file-remote-p always call expand-file-name if the connection is already established? From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 29 07:34:36 2019 Received: (at 34343) by debbugs.gnu.org; 29 Dec 2019 12:34:36 +0000 Received: from localhost ([127.0.0.1]:59337 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ilXmG-0002J8-IY for submit@debbugs.gnu.org; Sun, 29 Dec 2019 07:34:36 -0500 Received: from mout.gmx.net ([212.227.17.20]:42517) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ilXmE-0002Ip-JK for 34343@debbugs.gnu.org; Sun, 29 Dec 2019 07:34:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1577622867; bh=ecR3I0XeOfAZYxGSkUDzoPZx5gEZaNG/8lcpfq/DuVI=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=Ovcfejo0QnA6Gf8khA2t+U45xuUv3c/abMRNT+AsiJVudWZxgehRF6DVtkkXeFD6F odAJBxrCni/uIsmtmoUWoGmz5/b2rsaiyOY47J14AsUSX62Vo0RZhVN+pMSnNI5s8J mXNES3KE6m/g3mgf5OvpvSdZfI9tHsR6oQZLYF0g= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from detlef.gmx.de ([212.91.238.169]) by mail.gmx.com (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MxUrx-1jeih02Ca1-00xsTy; Sun, 29 Dec 2019 13:34:27 +0100 From: Michael Albinus To: Dmitry Gutov Subject: Re: bug#34343: [PATCH] Make project--find-regexp-in-files work with remote files References: <9d65284f-7a64-5e9c-ab02-fbbd1be41689@yandex.ru> <87r2bt1tio.fsf@gmx.de> <2cfd53b2-8202-a321-a853-da0c949b0f15@yandex.ru> <6cf8bfa8-3873-d3db-9139-854359027e8a@yandex.ru> <87h81mqiq5.fsf@gmx.de> <0ff03b20-20d8-b6c0-c876-3fd525586180@yandex.ru> <87mubdps6s.fsf@gmx.de> <87blrsz3tf.fsf@gmx.de> Date: Sun, 29 Dec 2019 13:34:26 +0100 In-Reply-To: (Dmitry Gutov's message of "Sun, 29 Dec 2019 03:15:19 +0300") Message-ID: <87blrrmht9.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:I/LCI16outwQkBp+Up5iZN8yOIInHjWJ2iIvvqKzP8CfxmLfeZP +kjeBLs0dTRa2tAGR3Nfz3QAr+uQNmL09TM41A6H0IH4EnVniNvEVvrfHfjesEjN4wEKoFI b9nmzqWlEsyC1AFa5j/hJYboYkphNayH/A2YlZHqZkSSH+VGLWt7jylai+RLqa2KAjrLkWC Alh8G/FbuwTLh8LBo+u6g== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:snj0MXSZWU8=:vELIXaagkH+CUrmxTlTuXJ Q8fJ1n8IiSJonrQsVT6a0Iomf0BWNmPk2oGBbkuzkycZ6D3lEMkyRB+UCg9Xtx+ptHVf7NuPV foAIlonK8uVU2MqeAQP6DEhWP6LcKI9RI2glWu+gmCW60hY1hmrBbubNujNq7w2iuhJCAKq8F 43dSdEM+o6pCz9RtuCgUIchMVan1dqDBZdVkljLcruJcvrZJfrNGORehIloLcCsuiC40rXNOW R4F2CjB8fvWzqD6MGMN5Kx832JaYq4POFoCTkxCy4UQSB9M25Wblh/P6BYxtu5EN0cggcnUEa 91KMI143h74DAAU4M8aufsgJnCBDL1AoEqrh1r6XXr0qzxzW9JzdFttdQVjzowpUedxqVLpRf bbVZ2cgyKAANhr9AMalr/dLLw58pv52dpKpoRN3kc23iAJ65Kcxg8iC4lh6bc6h5BrgonfphC MNB58TYQPlTAyf717Qg1+2eytZlAwS1820VK9Tib9Smiq0u4i5AOD8yyB6Yf0htqoY5R/fomi 8CwmQKfiTScJIK7TxZntZiNh4BvbfAPradR1qAx/SV/bA6PIBfvOcmGs6yqZGZ2Ygb2CuwJx7 Q0MuJ+wzE4hV0T0xtqk4gJ1zksNvfzusYJ6IO06sXOfJSBJc9f9WLr61vNEZkaOadNxN0k3d+ A/9HzNaWLx1LMsKZYNCfq7q0pg/rdipRZ+zt4BkMgRuWiLfyoXDbeKidMdKtkxozFCf0pHWmT f34tP5geuWpLIPn5F22rbcdPvwS1zuwo1qLO0IV36C5sbxpKlj/nzTvYuzuRUpuKhAZo3xNj0 t4cZEbVXqdjJrVhkaGWVKK/nyvf0yr7Q/iDvVMFn+2Km3ne7bEpCykg2Dt/qkGEMK5NRMfYF0 uBgqpkG+Q8GVULLeDS9wrxgTzt/et9GMnAFGvFtKZC6EIGj19moAJ4SZMkav9TZqDXcPx8KKc wfz1xpk126UkvtaL7x+9qYHs1xTfN65WM/PhDEUWlkEjTbCywRwduKv5+GXiRBsSYGbBPsq/2 tsCncXsJUnuaSV0Ji28ZEVfV5mnWRiJiv/DgOG9DNjY3zJfmh0ade5fX3xjPYSZYnRNHGIk0/ DvY9r47lFSdX4an0H2YXygm5zpRmzWZOsI9qeOlBWZvy39LQFQ5oqhFPzht2g0VTtc41T+WcS YzituSWKIAakLae96iHFhET3zRoOozVBP2BZCr/+otPidhKml34D1mKohqZngL6T7jNbD63sE +KB7UfY6uUW0c21rtaISqYSFlhYddYyqqUTvGd+Z5ruarmLL2OCP1l2NooJk= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 34343 Cc: 34343@debbugs.gnu.org, =?utf-8?Q?Felici=C3=A1n_N=C3=A9meth?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Dmitry Gutov writes: Hi Dmitry, >> I said already, that expand-file-name isn't needed for >> file-local-name. I will try to find a better implementation. > > Sorry, I guess I misunderstood you, then. I thought you meant to write > a new function, "a cheaper file-local-name". There could be both solutions, improve file-local-name, or create a new function. My strong preference is the former, of course. > BTW, does file-remote-p always call expand-file-name if the connection > is already established? Not always. But even if it calls expand-file-name, this doesn't mean always that a remote command is fired. This is what is expensive. Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 29 08:14:12 2019 Received: (at 34343) by debbugs.gnu.org; 29 Dec 2019 13:14:12 +0000 Received: from localhost ([127.0.0.1]:59354 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ilYOa-0003If-74 for submit@debbugs.gnu.org; Sun, 29 Dec 2019 08:14:12 -0500 Received: from mail-lf1-f50.google.com ([209.85.167.50]:45701) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ilYOX-0003IQ-CU for 34343@debbugs.gnu.org; Sun, 29 Dec 2019 08:14:11 -0500 Received: by mail-lf1-f50.google.com with SMTP id 203so23602775lfa.12 for <34343@debbugs.gnu.org>; Sun, 29 Dec 2019 05:14:09 -0800 (PST) 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=rlQScU8MPuFx3taqw0LapLsq/WL8QKUh3sUuHynYckc=; b=afPoPqUNI31UOu5qSy/VAiP28CUXvqLvAjx9GS/Yq3CN/JvHSUeZbyw3LfFfwizEjt DKZyJysovPEDopcY4zYESop2oX3kjJdjLvyfHNrMbUGe6BaoypQvXoFhKM5UaVlqHckG tjvRoDaQL6qsgGSaSoYMVfKzbVLgbx63WRsS4F0gP61PQqLeZKirU/jPnDiiTkSx4c3s jLtKSwpSEJFJWT3x6j7AqMYoNLxvl0PMj/nfco2jFlrP4TJ6bX5Q74F3jbn929/fuoeH AU+NKiJuvyQXWp30gKAe/oWdXQ8Wug+2CcnL9GarDMsAV6sPHs3Te2HzlXArRrmsh/xV 1I6w== 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=rlQScU8MPuFx3taqw0LapLsq/WL8QKUh3sUuHynYckc=; b=B8+dNi/RJBIfKscEEt7rrgPv/zqsehUHcExBzH8lJOzR/HoYgkuL4cnknlvUP/FGQ4 /RV0C00l7SYs6Uk1apDoHbvsJhk97mq7PDYIYpz6yiDamdXKC77Wy/DZBvtrpuPvAtti e7LuVu5DIJLggVOL1hV17coJDhAu4s9KqNH9QckcXBFRisBEegpWIPKy4w02k/xcTLLj 3KxhRSykCV2aEoHYohoUfIdkg/SsdxcMpCkvRSF39bb72WiBhrFD61z/KIa20b2vpG9W IfTHLNx7W+EBZMZN7FSlYu3NYfGlY7VSlR7k+GvO0rsB5iCTIcjyTJ4SUkSAX6Gy0BbE OMLw== X-Gm-Message-State: APjAAAXJveU3HYJyeVmkcaQjp6UPKdChgb5WEZXiLt4iVluJmjFMTlz9 y5SgliWATohw6zzF0RFe58xHFHg62zs= X-Google-Smtp-Source: APXvYqxToY800L/NIrQ8aHGu92RV1Z+m1hwY9wlSVXlBrTC17MZSG9ieJ6lrkQaPUYv9p7VOqDB7mQ== X-Received: by 2002:a19:40d3:: with SMTP id n202mr19365326lfa.108.1577625243036; Sun, 29 Dec 2019 05:14:03 -0800 (PST) Received: from [192.168.1.142] ([178.252.127.239]) by smtp.googlemail.com with ESMTPSA id y1sm13735385ljm.12.2019.12.29.05.14.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 29 Dec 2019 05:14:02 -0800 (PST) Subject: Re: bug#34343: [PATCH] Make project--find-regexp-in-files work with remote files To: Michael Albinus References: <9d65284f-7a64-5e9c-ab02-fbbd1be41689@yandex.ru> <87r2bt1tio.fsf@gmx.de> <2cfd53b2-8202-a321-a853-da0c949b0f15@yandex.ru> <6cf8bfa8-3873-d3db-9139-854359027e8a@yandex.ru> <87h81mqiq5.fsf@gmx.de> <0ff03b20-20d8-b6c0-c876-3fd525586180@yandex.ru> <87mubdps6s.fsf@gmx.de> <87blrsz3tf.fsf@gmx.de> <87blrrmht9.fsf@gmx.de> From: Dmitry Gutov Message-ID: Date: Sun, 29 Dec 2019 16:14:01 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <87blrrmht9.fsf@gmx.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 1.9 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On 29.12.2019 14:34, Michael Albinus wrote: > Not always. But even if it calls expand-file-name, this doesn't mean > always that a remote command is fired. This is what is expensive. That depends on our performance goals. As described in https://debbugs.gnu.org/cgi/bugreport.cgi?bug=34343#29, when called on a lot of files, it can be fairly expensive even when offline. Content analysis details: (1.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: gnu.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (dgutov[at]yandex.ru) 1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [178.252.127.239 listed in dnsbl.sorbs.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.167.50 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.167.50 listed in wl.mailspike.net] 0.1 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different X-Debbugs-Envelope-To: 34343 Cc: 34343@debbugs.gnu.org, =?UTF-8?B?RmVsaWNpw6FuIE7DqW1ldGg=?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.9 (/) On 29.12.2019 14:34, Michael Albinus wrote: > Not always. But even if it calls expand-file-name, this doesn't mean > always that a remote command is fired. This is what is expensive. That depends on our performance goals. As described in https://debbugs.gnu.org/cgi/bugreport.cgi?bug=34343#29, when called on a lot of files, it can be fairly expensive even when offline. But eliminating remote calls will be a win, for sure. From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 01 07:30:03 2020 Received: (at 34343) by debbugs.gnu.org; 1 Jan 2020 12:30:03 +0000 Received: from localhost ([127.0.0.1]:35795 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1imd8V-0002I2-0m for submit@debbugs.gnu.org; Wed, 01 Jan 2020 07:30:03 -0500 Received: from mout.gmx.net ([212.227.15.15]:39873) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1imd8S-0002GS-JA for 34343@debbugs.gnu.org; Wed, 01 Jan 2020 07:30:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1577881793; bh=NWNIddce5MiNXEJZbnqxVFaBMUOf6N0usGCP0Usz1zA=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=GHSB6a9b5u5ULPon/0Si4SMeoOzcZRP19JCEMH5GFTqQXcP4VYOwliK6vtBbBmp9t /OerXw5RLUTE7orEhgb7Hfg+621sZ+H23Cex7wcgtk3saboy0WfaIIj+wlnzwce+l2 FI7XESmtjDuLaRCwtFhqb9dApApYelCSI1po+27E= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from detlef.gmx.de ([212.86.59.161]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1M5QJD-1iloJw25X3-001TF2; Wed, 01 Jan 2020 13:29:53 +0100 From: Michael Albinus To: Dmitry Gutov Subject: Re: bug#34343: [PATCH] Make project--find-regexp-in-files work with remote files References: <9d65284f-7a64-5e9c-ab02-fbbd1be41689@yandex.ru> <87r2bt1tio.fsf@gmx.de> <2cfd53b2-8202-a321-a853-da0c949b0f15@yandex.ru> <6cf8bfa8-3873-d3db-9139-854359027e8a@yandex.ru> <87h81mqiq5.fsf@gmx.de> <0ff03b20-20d8-b6c0-c876-3fd525586180@yandex.ru> <87mubdps6s.fsf@gmx.de> <87blrsz3tf.fsf@gmx.de> <87blrrmht9.fsf@gmx.de> Date: Wed, 01 Jan 2020 13:29:52 +0100 In-Reply-To: (Dmitry Gutov's message of "Sun, 29 Dec 2019 16:14:01 +0300") Message-ID: <87tv5fs6kf.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:HKfWHobJa0vGXokqSQfZt9uqLypzAHMQ+JHgiks4ApXt2NTH+j3 mnYcLrGwVv0HgAvwT6oZ26V+koX7v52M9YWOeIZglagX6AFo1DpkqR++5rO0AZKQCrPFXNF Fzp4+T3KlyO/zLZzrekOHUxH6U2kDdSIA+YLgkXqrxtl1I9LZD8HrKUogX+340FUR2WzMGY LjyUw++s7e6YSBV2izx8Q== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:crxMrOe7RQg=:4qRfje82aSOHBKXCWe9Ke3 9TQX1/2Gjrx1Di5Qyba0F0C7msx9lVyMt59mh1ljRB9P2yETmoTlW56jGOoHfg0BK2I9qNqGU 74cOdpv50ZhKvkIF+108bdXcDpsiTJTJs4tXmFKYgiVxrq89jaVN7PviK4wpA1muBAXuBsuKB 1e3A5+0YEGwbE1nhgMEzU8Sd+jFoq0qUWagQu6Ae+L47HSrBfTaUEM9OqdW4XZFula3vHaHUG fQ5SwGU9q4LIibLhmFgJH28r252TO0O/Ybcw20bOsic36c405xePP+VjN997PPJH/L6Y754bP hDOIGNApgkwwDoLwQC5Am/qU5+zll6mmd5QAMzCvfufsuopWd6IoU3y8duXuYq8Wklj6GQ37x zPqQHiHKjWvoXFHOiwFYhs0WTixSsNVF9mKzVrQ4sfwe7fkWuRrzaA981C9Hkz8D9oihP27O2 dRcLJqb/0+6AaTKqV+8plAoV8ylSs+YTrYHpn2GD65SKgdMsnJ0G94o6eJZM9vWfy/Q7X4dyI KfcTs4fRXHkkdQrI3O4z2K5BF/NJKiVAcxsgljSjAUHKUPxS+JBgJdyA6G/LjNKY2Y6+rBEN6 UPYq3w5Nun6ickZYYIghwec1XgQX8jVCQ9ZVbNYQOBKqCtrcu0ZPDjVZTVcihzR/FmxmsmN50 Zthj6kloqbysmAjoGKLyPSHAEZXQN9CGZI/SYiOSTYJL0ol7iXb5bTCTlA3qrflBTpftG5n85 0/kTkisuNMSwTytcEFusmI1FVoMq7Vv4eNrh1r+Fr+9uojS/FC3djZ9HPNdE6q6RxdMhI9c7B 5gV1qptZzvvQa5dLszTge5BZ8/iWQFRiBQ+VzR5GdJASzm2jyE33H+i+0QGMtrVbwZ59t4Nk2 vqG79DKzetJOmk3I3ZTohYSTLm2R6ZH3jcsksl833sWMwo/qhAYHuIbsS60aXzVatEyNvOTDL Xpqn9Rl49ZHCPPAmKwGHxTTK3v+REaAhppc/ImbzqGJFHsIA5h45xRVpTWatmGxn7DtLbHLR6 46qrgwor0eKikxT10WJrNv1LHDnWY0MMCr78DY32ivV4YRPc+v8sM7Xnyp9ioZuOCfmtEnFdc QrHWxXtRO2r95xruNOnNtpniXYUsKQaX7loKHBnv+6uAndhnxkRL82TcdWfEMPzc9ApIbc2iW Rf/pW9+hpT19mWIUdXIt1EtDqnXdwL5Umoda0NGT74kUVM8B5W+qwd0ms/7BTmeejF/z0G1ca ChEHOUfwWRReg69ZUzizhDODnpXT5AQJ3VQizGNm0zoYadOgIFT89EST8zLM= X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 34343 Cc: 34343@debbugs.gnu.org, =?utf-8?Q?Felici=C3=A1n_N=C3=A9meth?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Dmitry Gutov writes: >> Not always. But even if it calls expand-file-name, this doesn't mean >> always that a remote command is fired. This is what is expensive. > > That depends on our performance goals. As described in > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=34343#29, when called on > a lot of files, it can be fairly expensive even when offline. > > But eliminating remote calls will be a win, for sure. I've played a little bit with this. Even if there is no remote file name involved, file-local-name is slow due to the file-remote-p call and the file name handler mechanery. See: --8<---------------cut here---------------start------------->8--- (benchmark-run-compiled nil (dotimes (i 1000000) (format "/tmp/%d" i))) => (1.720033035 16 1.2495203040000007) --8<---------------cut here---------------end--------------->8--- This is my initial example. Evall'ing `format' 1.000.000 times. --8<---------------cut here---------------start------------->8--- (benchmark-run-compiled nil (dotimes (i 1000000) (file-local-name (format "/tmp/%d" i)))) => (5.072258441 16 1.2559830709999957) --8<---------------cut here---------------end--------------->8--- Although still a local file name, the elapsed time is about three times as large in the initial example. --8<---------------cut here---------------start------------->8--- (benchmark-run-compiled nil (let ((remote (file-remote-p "/tmp"))) (dotimes (i 1000000) (if remote (file-local-name (format "%s/%d" remote i)) (format "%s/%d" remote i))))) => (1.831333636 16 1.2604051830000103) --8<---------------cut here---------------end--------------->8--- Refactoring the code, and applying `file-local-name' just to the cases where it is needed, shows an elapsed time similar to the initial one. Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 01 20:22:26 2020 Received: (at 34343) by debbugs.gnu.org; 2 Jan 2020 01:22:27 +0000 Received: from localhost ([127.0.0.1]:37869 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1impBy-0006dD-On for submit@debbugs.gnu.org; Wed, 01 Jan 2020 20:22:26 -0500 Received: from mail-lj1-f178.google.com ([209.85.208.178]:41227) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1impBw-0006cz-MC for 34343@debbugs.gnu.org; Wed, 01 Jan 2020 20:22:25 -0500 Received: by mail-lj1-f178.google.com with SMTP id h23so39296276ljc.8 for <34343@debbugs.gnu.org>; Wed, 01 Jan 2020 17:22:24 -0800 (PST) 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=bDLVPDqomC/OH4fD0hFa7x5H0RAKzl72bO9roS7AqaA=; b=cP0/eyokmKItSFgBKj66TKTWOUwsn4J365ci6jBj/gNoFsAdKnCojw1fguLUcHPy31 El5dWQi5VS7dj2lLCod0pY4p6n4SgO4WYNybisGH5dZmi/Gw0lRIiunr4z+/a4AVQ44N qbKIR8IwjNSsaPg0VmrqA5qRSr3HvE0gkhOD8rDDlsKNaCaSXWWcVtys+83cv05NfEjD AuQNFA7U1Jp5yyqyRbLtG/7yP9L0ZOYxrj+vERc/KRybtNGw5JwNUtP/6RDVxW84PHKd mWtXH2zEpGj/XTyPfekEa1xYKFMHy1pZ216l3gwQuqEBt7WpbZeB38kiQgl96xexkN/y 40Xw== 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=bDLVPDqomC/OH4fD0hFa7x5H0RAKzl72bO9roS7AqaA=; b=SwGtszIcNEpK2EiYGUKRIF7DAEjeNUznfbBEqSna3DPZVM1ofPdqmOGhItpeDxc/87 1rirECy40s+edKq20cV44XjKJw59Gd0ds0LZs7LrHbR3NwLvk6t7wrQbPIu0IeYGRua5 qSpaofSOOFjZFdliseWPW/J7DOPuMGLxRcWrziayc4NoQeyvog/wjkRk3FeNiUvR2f8i 70XCPYsIozM0rkoBHQbQhANreYeroEOJo3J3XEZR6UHtUl+JJa4xkjQjKKMOz/EsonGV JwKj2nmAMj5oQCkhB3NYcG8fmyBfuB2uL4p4Z7r4ldd1FmH+muK7j7cP4UdkOl6I+BuY Rq+Q== X-Gm-Message-State: APjAAAXMPOYllMG/YxWzkTUGmey4gR59Q/mckh8BEb9lFwL1rOAexhVW eM5spOcZoOhQWvFqyK73Jm+7JqKSVPk= X-Google-Smtp-Source: APXvYqw4ECQIBG0iyOS5gIswdTGybrHYjfbSAUIQKMjBzPyKF5GmWjumLqTYrmCtdb6hMafXin1Suw== X-Received: by 2002:a2e:88c4:: with SMTP id a4mr18781123ljk.174.1577928138316; Wed, 01 Jan 2020 17:22:18 -0800 (PST) Received: from [192.168.1.142] ([178.252.127.239]) by smtp.googlemail.com with ESMTPSA id f26sm21773398ljn.104.2020.01.01.17.22.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Jan 2020 17:22:17 -0800 (PST) Subject: Re: bug#34343: [PATCH] Make project--find-regexp-in-files work with remote files To: Michael Albinus References: <9d65284f-7a64-5e9c-ab02-fbbd1be41689@yandex.ru> <87r2bt1tio.fsf@gmx.de> <2cfd53b2-8202-a321-a853-da0c949b0f15@yandex.ru> <6cf8bfa8-3873-d3db-9139-854359027e8a@yandex.ru> <87h81mqiq5.fsf@gmx.de> <0ff03b20-20d8-b6c0-c876-3fd525586180@yandex.ru> <87mubdps6s.fsf@gmx.de> <87blrsz3tf.fsf@gmx.de> <87blrrmht9.fsf@gmx.de> <87tv5fs6kf.fsf@gmx.de> From: Dmitry Gutov Message-ID: <7a1e2e22-89d4-b8b9-6cd4-e6947436138c@yandex.ru> Date: Thu, 2 Jan 2020 04:22:16 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <87tv5fs6kf.fsf@gmx.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi Michael, On 01.01.2020 14:29, Michael Albinus wrote: > I've played a little bit with this. Even if there is no remote file name > involved, file-local-name is slow due to the file-remote-p call and the > file [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [178.252.127.239 listed in dnsbl.sorbs.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (dgutov[at]yandex.ru) 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.208.178 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.208.178 listed in list.dnswl.org] 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different X-Debbugs-Envelope-To: 34343 Cc: 34343@debbugs.gnu.org, =?UTF-8?B?RmVsaWNpw6FuIE7DqW1ldGg=?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) Hi Michael, On 01.01.2020 14:29, Michael Albinus wrote: > I've played a little bit with this. Even if there is no remote file name > involved, file-local-name is slow due to the file-remote-p call and the > file name handler mechanery. See: This is unfortunate. But there's a bigger problem: file-local-name is even slower when the file name actually *is* remote. > Refactoring the code, and applying `file-local-name' just to the cases > where it is needed, shows an elapsed time similar to the initial one. If you take a look at xref-matches-in-files, you will find that is exactly what I did. But check this out: ELISP> (benchmark-run-compiled nil (dotimes (i 10000) (file-local-name (format "/tmp/%d" i)))) (0.01541569 0 0.0) ELISP> (benchmark-run-compiled nil (dotimes (_i 10000) (file-local-name (format "/ssh:abc@def.com:/")))) (3.229403787 28 1.9053286330000034) And that is for just 10'000 files, not for 1'000'000. And with longer file names, the process takes even longer (twice as long in my real-world example). From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 02 05:49:00 2020 Received: (at 34343) by debbugs.gnu.org; 2 Jan 2020 10:49:00 +0000 Received: from localhost ([127.0.0.1]:38273 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1imy2F-0007JU-Q7 for submit@debbugs.gnu.org; Thu, 02 Jan 2020 05:49:00 -0500 Received: from mout.gmx.net ([212.227.15.15]:43841) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1imy2E-0007JD-2K for 34343@debbugs.gnu.org; Thu, 02 Jan 2020 05:48:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1577962131; bh=dnuP1pg4AeL22S8cMY3xsx7lyKLYQkDcSaMgKNBUKM8=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=Cpxf8jPFRD8ld7/7dBGxRyiPhUJ7FodOj8B9J8sNTP7zZ9WSqzEk1z0UN+T/yMYLl weKahA6O4b8kDTYkmyg2oOVFj7gQq/1IDRdmIi7ZnRtVThlbY1P0LL8slkUbJlM/l0 REIq+2m7Ovt97IaDqesM3BhuuGhQ9RfNxwmzT940= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from detlef.gmx.de ([212.91.242.204]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N1wlv-1jjuQ73gcb-012DA7; Thu, 02 Jan 2020 11:48:51 +0100 From: Michael Albinus To: Dmitry Gutov Subject: Re: bug#34343: [PATCH] Make project--find-regexp-in-files work with remote files References: <9d65284f-7a64-5e9c-ab02-fbbd1be41689@yandex.ru> <87r2bt1tio.fsf@gmx.de> <2cfd53b2-8202-a321-a853-da0c949b0f15@yandex.ru> <6cf8bfa8-3873-d3db-9139-854359027e8a@yandex.ru> <87h81mqiq5.fsf@gmx.de> <0ff03b20-20d8-b6c0-c876-3fd525586180@yandex.ru> <87mubdps6s.fsf@gmx.de> <87blrsz3tf.fsf@gmx.de> <87blrrmht9.fsf@gmx.de> <87tv5fs6kf.fsf@gmx.de> <7a1e2e22-89d4-b8b9-6cd4-e6947436138c@yandex.ru> Date: Thu, 02 Jan 2020 11:48:49 +0100 In-Reply-To: <7a1e2e22-89d4-b8b9-6cd4-e6947436138c@yandex.ru> (Dmitry Gutov's message of "Thu, 2 Jan 2020 04:22:16 +0300") Message-ID: <87mub6uoa6.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:EOv4O6RHoj8zujI6dlDve9SYWQSPvysm1yNfQX8t7plTPXJ75lV WF9WEN0Z0D17OnTYDefpMLhsh7zAwQfLunvePzloqAMgs6Rpse3DIjYPKE9ftl6VVyZSNd5 f14w8q+OxCx9RqFIpSR8JfxbtXXPMjV4laXBJbnQ5a6+Z0qCuhTQooulPE1ufiSqt93RNn3 4XOumMRh/FfxWBR8ut/YQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:hZdHDUBnbcc=://3gopdlDkZyIkdNvxXNxP x10W2iEqBA0tbrarlWR/c4QADAx8m4G2QqFVzuahlWO/xIs2zAFr7IckrxQtJ/fAbMSpNOMBD o9TeZtRVoL5rgODzASAEAr1/N1+Q8KFtU6uWqmVf/znvLGgFevQxKgWrhJye+WIl+LxGAANhj +7RQl4z6dJhWbFZpryFeIF4m0JtleFbV5ZnIhWJkD5Ytp2QGuz424pf8sKKGlXX7tbwYflyEL lltLjlNdNfrh60+kE3z1c3mBrX9M9N56yfM3RbBHYINu7/0U/zITHPfiKOBcf5LNumDDqQKJi 1voiIOFjxv9qiHBmdGrAJTIIpTqjzvMFIEZOLQUNLEVBR2QkoCOKv5lrL0EItr0JjFfbXKg+/ MV33h0k/aTnDpbRaHwo4U7NlT9gx3uJLdyKuYpzJfbOUURr6H3N97oNYrAlLQ0pEhyfgPCdOL mGYbjT6VokgApv2LIu/UXvgGmQOCL2B3lRuwi9Y3y3jtsoxzgjc5ps6CVhC4dqLZCjPbEtT/3 vPxZ61rWb3sGGc9DZJVkVWKHXwX44EzRE7G4PYRhsi2N6x2k+4ysOOVTiDim1MIdj6yaSCEuY 5V9hCVnpQmumJLlNhgu796ZMRu7sxdcQEoqIkVVOVghJH6qUT+2qjum7rLHu2CleVgb1OSZXU ACfHLg8fH2hpSEZBEJuKXab2WIpYqjMrBFeqqxpDuf1IUVjQJdfRAxIcmgCO+PdaFv2PDKt6X V0743LmDYRQLcEZpQBNv8RG7VXLtpRVHpYzrYXaQt6gGt0On6XAdWPXMkqXk0Nd11mTbohJsy bvLMZm32lAbPhO9IltBi4FrSWX0xIMn32CypWn6IwQsNbz5Weh2cHyRey3y43XTLT/8ESNPhs HbeYUGMLXqMxjANHJWh8VVRqm8Dgqp8YrKtdEME7nQDFJzBNphx1UBvKcn6+r5hV6uWl8Nwwi Es7OFZ6cOgq1tTmSCV3uOB+YIgbvW7DulwDASNWTS8oopRi4vW8F6+W/cL/w0u25PLmn12cA0 EHkAbsknXjkVIYrgDrTiYThWDBczfrlmzN6/dALrxfeIGJK5hnI7egiULjNrXQznqBMLcxvJf 144YppaOBQicpNi0VHb/wXo19uekOtspjLxQxsmcAqMw+9KG3CfvQ52P1PtA3xJ8t4TfxerBP vOh/LZ8YsE5Fihks0hAFnh3N29Ow+GH+4G2a6QUR/dcixh30OhqoDmvS3vjtpQkzExGIw5dV3 hQIvBlRrLX1NuK+C0pGfH+Df2mzCJOwT6OhDFjI8sshDvako0IiBhkKjMO80= X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 34343 Cc: 34343@debbugs.gnu.org, =?utf-8?Q?Felici=C3=A1n_N=C3=A9meth?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Dmitry Gutov writes: > Hi Michael, Hi Dmitry, > > On 01.01.2020 14:29, Michael Albinus wrote: >> I've played a little bit with this. Even if there is no remote file name >> involved, file-local-name is slow due to the file-remote-p call and the >> file name handler mechanery. See: > > This is unfortunate. But there's a bigger problem: file-local-name is > even slower when the file name actually *is* remote. > >> Refactoring the code, and applying `file-local-name' just to the cases >> where it is needed, shows an elapsed time similar to the initial one. > > If you take a look at xref-matches-in-files, you will find that is > exactly what I did. > > But check this out: > > ELISP> (benchmark-run-compiled > nil > (dotimes (i 10000) (file-local-name (format "/tmp/%d" i)))) > > (0.01541569 0 0.0) > > ELISP> (benchmark-run-compiled > nil > (dotimes (_i 10000) (file-local-name (format "/ssh:abc@def.com:/")))) > (3.229403787 28 1.9053286330000034) > > And that is for just 10'000 files, not for 1'000'000. I've started with --8<---------------cut here---------------start------------->8--- (benchmark-run-compiled nil (dotimes (i 10000) (file-local-name (format "/ssh:abc@def.com:/%d" i)))) (4.222947337 31 1.384718521) --8<---------------cut here---------------end--------------->8--- Then I have removed everything from tramp-handle-file-remote-p which isn't necessary for the 'localname case, and I came to --8<---------------cut here---------------start------------->8--- (benchmark-run-compiled nil (dotimes (i 10000) (file-local-name (format "/ssh:abc@def.com:/%d" i)))) (3.876818843 28 1.3257780540000006) --8<---------------cut here---------------end--------------->8--- Better, but not significantly. And tramp-handle-file-remote-p wasn't usable for other cases anymore. So I fear we cannot do much better as it is. > And with longer file names, the process takes even longer (twice as > long in my real-world example). I cannot confirm "twice as long". I've tried --8<---------------cut here---------------start------------->8--- (benchmark-run-compiled nil (dotimes (i 10000) (file-local-name (format "/ssh:abc@def.com:/a/b/c/d/e/f/g/h/i/j/k/l/m%d" i)))) (4.185161814 30 1.425226717000001) --8<---------------cut here---------------end--------------->8--- The difference is likely because tramp-file-name-regexp has been applied to a longer string. If I simplify tramp-file-name-regexp, we get --8<---------------cut here---------------start------------->8--- (setq tramp-file-name-regexp "\\`/[^/:]+:[^/:]*:") "\\`/[^/:]+:[^/:]*:" (benchmark-run-compiled nil (dotimes (i 10000) (file-local-name (format "/ssh:abc@def.com:/a/b/c/d/e/f/g/h/i/j/k/l/m%d" i)))) (3.510464452 30 1.4363330669999996) --8<---------------cut here---------------end--------------->8--- Better, but with the penalty that the other parts of a remote file name aren't detected any longer, and tramp-handle-file-remote-p still works only for the 'localname part. Both not acceptable. So I fear we must live with the status. Yes, file-local-name is slow for remote files, and yes, it doesn't matter for single invocations. Bulk invocation, as you have it, will show an additional performance penalty, even if there is no remote execution of any command. Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 02 19:52:39 2020 Received: (at 34343) by debbugs.gnu.org; 3 Jan 2020 00:52:39 +0000 Received: from localhost ([127.0.0.1]:40232 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1inBCh-0007As-Jv for submit@debbugs.gnu.org; Thu, 02 Jan 2020 19:52:39 -0500 Received: from mail-lj1-f176.google.com ([209.85.208.176]:42960) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1inBCf-0007Ag-Tf for 34343@debbugs.gnu.org; Thu, 02 Jan 2020 19:52:38 -0500 Received: by mail-lj1-f176.google.com with SMTP id y4so28045318ljj.9 for <34343@debbugs.gnu.org>; Thu, 02 Jan 2020 16:52:37 -0800 (PST) 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=StqA4JokL1Z0PJKfNWU9VWQCKq2dGujfSYWeuucf/EY=; b=BKs/XVB3qeCoMQVRC6yZ73to7uP0a7YLVDuWsrIt0rXSNFwt0JtnWc0Mg7Phd1OQkj OY5SUuDE8n0nrCFxUud/983+m7ZWTpMLjaeJ9oHRUgmHJzK/jcn79bzHRqeXff3TW4fF ldgTbD5rH2nfzngznN3EUKspwNGcv3qs9tDX9fPoKurSWLHmlDhpEomIM24fx951Bx08 vvLjcORxzrkkHREZInp7jeXXe7e5sfLDCZBtpbPy9rIRsVRHZGs5J+xgdB7ZSg/1spwo mMKRQPz0x/Nlcd/lIWuy7PAKE7v3JQoIvJWMIC3m+CKoCQntZPn04Mq6GlEfONUl8PBJ fCbw== 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=StqA4JokL1Z0PJKfNWU9VWQCKq2dGujfSYWeuucf/EY=; b=TRWmMHux/Lo7Ds+RKf44Nz7DgISGZS3vrA5vClz/VkPgBMv2Mw1Yp5h9gU+e/5EonC YtuTC7qWfUlGzZOmY6F7sE/SWg17/ff4s56lBkSgr2E5PzYqZZaCDJCmaEwWZ2ojTM0q 2UuX6CA2lY1TD6Wk23SIZPBtGSe6OG5Xm7iHzVjIzx4vhfaux9sqy6kBlSujsupHOxdV i4TkG1xsJVJ4K1BHqtk2jSOVBUahuy74S4muZlzqqmRL+zLt67h/kv9ItMXnddujBYEj 2K3TJyPMSeOJgICDavOFdp7ROU0B4ncolm99F/6T72cSYg8FNh7XqLrq8WXMtWYL/0qb sNjQ== X-Gm-Message-State: APjAAAWXaJEy6EIeZZcmasuP5BgPWbqY7VyfEiQ3nnm57e5O2Y0RwK5o 34rvmCLYSeVASgDPKgOkeraW8eLmi0U= X-Google-Smtp-Source: APXvYqzmv0DmQ+DCFSte6/kyZNmdKemuuoria3T+ar0RdU7g7+KqvMi2rto2ZFyiO1bx1lMemaFASA== X-Received: by 2002:a2e:b4f6:: with SMTP id s22mr51059614ljm.218.1578012751560; Thu, 02 Jan 2020 16:52:31 -0800 (PST) Received: from [192.168.1.142] ([178.252.127.239]) by smtp.googlemail.com with ESMTPSA id l12sm23547241lji.52.2020.01.02.16.52.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Jan 2020 16:52:30 -0800 (PST) Subject: Re: bug#34343: [PATCH] Make project--find-regexp-in-files work with remote files To: Michael Albinus References: <9d65284f-7a64-5e9c-ab02-fbbd1be41689@yandex.ru> <87r2bt1tio.fsf@gmx.de> <2cfd53b2-8202-a321-a853-da0c949b0f15@yandex.ru> <6cf8bfa8-3873-d3db-9139-854359027e8a@yandex.ru> <87h81mqiq5.fsf@gmx.de> <0ff03b20-20d8-b6c0-c876-3fd525586180@yandex.ru> <87mubdps6s.fsf@gmx.de> <87blrsz3tf.fsf@gmx.de> <87blrrmht9.fsf@gmx.de> <87tv5fs6kf.fsf@gmx.de> <7a1e2e22-89d4-b8b9-6cd4-e6947436138c@yandex.ru> <87mub6uoa6.fsf@gmx.de> From: Dmitry Gutov Message-ID: Date: Fri, 3 Jan 2020 03:52:27 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <87mub6uoa6.fsf@gmx.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 1.9 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On 02.01.2020 12:48, Michael Albinus wrote: > Then I have removed everything from tramp-handle-file-remote-p which > isn't necessary for the 'localname case, and I came to > ... > I cannot confirm "tw [...] Content analysis details: (1.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [178.252.127.239 listed in dnsbl.sorbs.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (dgutov[at]yandex.ru) -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.208.176 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.208.176 listed in wl.mailspike.net] 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different X-Debbugs-Envelope-To: 34343 Cc: 34343@debbugs.gnu.org, =?UTF-8?B?RmVsaWNpw6FuIE7DqW1ldGg=?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.9 (/) On 02.01.2020 12:48, Michael Albinus wrote: > Then I have removed everything from tramp-handle-file-remote-p which > isn't necessary for the 'localname case, and I came to > ... > I cannot confirm "twice as long". I've tried ... My file names are longer still. I can give a specific example later, if you like. > The difference is likely because tramp-file-name-regexp has been > applied to a longer string. > > If I simplify tramp-file-name-regexp, we get ... Both are fine avenues for exploration, I think. But most importantly for now: tramp-handle-file-remote-p does not take up the majority of time spent in file-remote-p. tramp-file-name-handler does: ELISP> (benchmark 10000 '(file-remote-p "/ssh:abc@def.com:/%d" nil t)) "Elapsed time: 3.535115s (2.112970s in 27 GCs)" ELISP> (benchmark 10000 '(tramp-handle-file-remote-p "/ssh:abc@def.com:/%d" nil t)) "Elapsed time: 0.780867s (0.645621s in 8 GCs)" ELISP> (benchmark 10000 '(find-file-name-handler "/ssh:abc@def.com:/" 'file-remote-p)) "Elapsed time: 0.070135s" ELISP> (benchmark 10000 '(tramp-file-name-handler 'file-remote-p "/ssh:abc@def.com:/%d" nil t)) "Elapsed time: 3.409674s (2.070461s in 27 GCs)" And that function does a lot of things that I'm not sure we need to just get the remote id. From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 02 19:57:36 2020 Received: (at 34343) by debbugs.gnu.org; 3 Jan 2020 00:57:36 +0000 Received: from localhost ([127.0.0.1]:40240 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1inBHU-0007IG-Gx for submit@debbugs.gnu.org; Thu, 02 Jan 2020 19:57:36 -0500 Received: from mail-lf1-f41.google.com ([209.85.167.41]:41219) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1inBHS-0007I4-Ot for 34343@debbugs.gnu.org; Thu, 02 Jan 2020 19:57:35 -0500 Received: by mail-lf1-f41.google.com with SMTP id m30so30935516lfp.8 for <34343@debbugs.gnu.org>; Thu, 02 Jan 2020 16:57:34 -0800 (PST) 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=+lnAhDFfKlcpS/UBxSrvmFkhXJVO6THZiOhRTCcPZZE=; b=flqrrPZsisF1xDhBeBZyfHg214MNyhilD9Xeb1jlmU6g1OhHc5hoNmcOkaCa96FfYh F9kK7MHdC5TK5qPg7obbNBy3Sf4B5qc/EqsycUoBEeeijEHDH4dWu/rAk59ciMIQELg5 lLF+sLFxFngdRjZGdM/d9qwPNzfCaFctiZbiF6gzOzGyyvkC6JwoP97ocAt4z/1/9XRp C39znssODFro53Dq933v7yKxIl2ZbLGkVAK67EWIRzss7jH5di6Eyv92Cjg+m/VrYmLW fQZ5T4KweJt243HtT9lBBtMJwFU3mdaqxwsBftyhw7Kd3S+PoTfpzv2zSxsUEvhrLc80 Ibfg== 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=+lnAhDFfKlcpS/UBxSrvmFkhXJVO6THZiOhRTCcPZZE=; b=SC/1v+66FMrXSqyxhM19oHwoiYdqXqmhKEfMSu+035wes4E57wc2CjSyNX1f+HiwZ4 jvrvp9w3UfSyRzMOreR3Ov7RZRPgqnsBJc91JzYdpQtPR6Hay8s9nMfTF7FfYWM1IDfW oCn/LLtEd2pBfsPb4HWGVBc01BWajo4HlilqEIh1z6VXoW7iyZ9ef/jmsEIAeNGPWgn7 XRxZufGH+j03lEhrwwmSUock5Gbyq/rsUbXXQJu9xC4HtavrjaK5YWWBD6pyFGPCSAdT jJl4GYagszTxMJq/54nIFENU9BWN5zXBqiCVhGFixlrv68OgTqQYT4uA4WtjbVgw7odd IS/w== X-Gm-Message-State: APjAAAXmNGhTafvFaqYJispfarhlz8qfCEylkZhcuyVNNENEAJuKFVPZ gElN49hNIXNkSebysrWf+Mnl3VV4m8w= X-Google-Smtp-Source: APXvYqybZ3VkLvyPqnMMztTR5NenFZTNMozJE6lFUXmyjkmh2YRxkYDHWHR4dPrnNFQXu44vbwkydg== X-Received: by 2002:ac2:4316:: with SMTP id l22mr48407205lfh.115.1578013048480; Thu, 02 Jan 2020 16:57:28 -0800 (PST) Received: from [192.168.1.142] ([178.252.127.239]) by smtp.googlemail.com with ESMTPSA id f30sm18711829ljp.31.2020.01.02.16.57.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Jan 2020 16:57:27 -0800 (PST) Subject: Re: bug#34343: [PATCH] Make project--find-regexp-in-files work with remote files To: Michael Albinus References: <9d65284f-7a64-5e9c-ab02-fbbd1be41689@yandex.ru> <87r2bt1tio.fsf@gmx.de> <2cfd53b2-8202-a321-a853-da0c949b0f15@yandex.ru> <6cf8bfa8-3873-d3db-9139-854359027e8a@yandex.ru> <87h81mqiq5.fsf@gmx.de> <0ff03b20-20d8-b6c0-c876-3fd525586180@yandex.ru> <87mubdps6s.fsf@gmx.de> <87blrsz3tf.fsf@gmx.de> <87blrrmht9.fsf@gmx.de> <87tv5fs6kf.fsf@gmx.de> <7a1e2e22-89d4-b8b9-6cd4-e6947436138c@yandex.ru> <87mub6uoa6.fsf@gmx.de> From: Dmitry Gutov Message-ID: <40127a4c-8350-e551-05c6-54c7ebba2324@yandex.ru> Date: Fri, 3 Jan 2020 03:57:27 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <87mub6uoa6.fsf@gmx.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 1.9 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On 02.01.2020 12:48, Michael Albinus wrote: > Yes, file-local-name is slow for > remote files, and yes, it doesn't matter for single invocations. Bulk > invocation, as you have it, will show an additi [...] Content analysis details: (1.9 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [178.252.127.239 listed in dnsbl.sorbs.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (raaahh[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.167.41 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.167.41 listed in wl.mailspike.net] 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different X-Debbugs-Envelope-To: 34343 Cc: 34343@debbugs.gnu.org, =?UTF-8?B?RmVsaWNpw6FuIE7DqW1ldGg=?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.9 (/) On 02.01.2020 12:48, Michael Albinus wrote: > Yes, file-local-name is slow for > remote files, and yes, it doesn't matter for single invocations. Bulk > invocation, as you have it, will show an additional performance penalty, > even if there is no remote execution of any command. The unfortunate imbalance here at the moment is that piping the list of file names through file-local-name takes longer than the time to fetch all the project files, and the time to search them, combined with the all the necessary round-trips to the servers I have been testing at (where the RTT is > 200 ms). As soon as the project is at least of moderate size. From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 03 04:28:18 2020 Received: (at 34343) by debbugs.gnu.org; 3 Jan 2020 09:28:18 +0000 Received: from localhost ([127.0.0.1]:40399 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1inJFi-0002mU-GX for submit@debbugs.gnu.org; Fri, 03 Jan 2020 04:28:18 -0500 Received: from mout.gmx.net ([212.227.15.19]:47133) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1inJFg-0002mF-EQ for 34343@debbugs.gnu.org; Fri, 03 Jan 2020 04:28:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1578043688; bh=cIfchYXQdaM2insG6f0+RLTARwaySZvUq0pbyiTJKr0=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=eczsqx/rebeQWtYnrzcn0+xaDEjNsIgGBW7oAnr/8PlO6kBLJEJ5TaIA3Og17ELDe TSyG1C6pUHo8x7hTSr4grg+Oj4tvZ8dQhCuNeYFGd2UWVh3YEnJWrvxs6wdSdUQTIA N39s0v5wu+0TAnL6ZzDeWlunOcE8ywdzYgP8/5Po= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from detlef.gmx.de ([212.86.57.135]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MoO2E-1jXggK24FM-00oqQV; Fri, 03 Jan 2020 10:28:08 +0100 From: Michael Albinus To: Dmitry Gutov Subject: Re: bug#34343: [PATCH] Make project--find-regexp-in-files work with remote files References: <87r2bt1tio.fsf@gmx.de> <2cfd53b2-8202-a321-a853-da0c949b0f15@yandex.ru> <6cf8bfa8-3873-d3db-9139-854359027e8a@yandex.ru> <87h81mqiq5.fsf@gmx.de> <0ff03b20-20d8-b6c0-c876-3fd525586180@yandex.ru> <87mubdps6s.fsf@gmx.de> <87blrsz3tf.fsf@gmx.de> <87blrrmht9.fsf@gmx.de> <87tv5fs6kf.fsf@gmx.de> <7a1e2e22-89d4-b8b9-6cd4-e6947436138c@yandex.ru> <87mub6uoa6.fsf@gmx.de> Date: Fri, 03 Jan 2020 10:28:07 +0100 In-Reply-To: (Dmitry Gutov's message of "Fri, 3 Jan 2020 03:52:27 +0300") Message-ID: <87blrksxco.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:i93ZbVAGrH/LFXQqaS21gr2fFOlBnyWiO4A4z7hz32USeP6RDzy vjm98bRBIg0099UyPrTIPiAyLNQqs+kaln2Ih+ISOwIGHTxKyCDm8Lyee9ysoEoLb771Jfe QWMHg6+h/Z+Wopxv5R30LdQ2iKhvrlpFqH0UwDLPJJdfM2Mx4EkWUFGB4IKnq/cj/pViMM8 4QPA3nS072xrxOk3ryywg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:v8gl35L9PW8=:KnNKsmzZ0Uo51F/ce/ZB3C FA4L4yhg5Gb1hgTF+dYhDFqw1B0/I6sSj2joexLAttiwbvUHjwGoD/itQ2jpyYNH6kKNeBBMA GxdxyYpWQ0F1DqCsd/52CXGB8dp87TUd6yRojRqvHk6DjtKR4GDCO18st1xEr1VJR2WZ+jzS2 t+/9ozOWciXqU0sgEYDXk/Iyxz0tRukTKR2AfHc4O0WRUBRC/aaacRf8+/IQ8yUhiRNjMo0nF Jmsn1OtuZWAQeGiWBlDkQ4tiBOhUTH54kydvIt7N1q6l5wg5JKdZUiXzS0fY5hA+8/6L4IvaK hqOHjzMEOQonwMzu1abFK3FjgXFY6U6VX9ApsADpVrmXcKWajEbX+Gi00j+V+E+WZO7jurk3E deyA3SxqZ/qiZvclSMaHNZk3oGbLFqWGRi/edJL8tTfNqCw14Mfl1Ym/ZC6NS9VhhAy0wa6d1 Brx1jffOLGmIVysumhoA7TN5p5lULqXWuqVbUk9GgAGI6AURxyZxIsijFzmwfTwOG4O+5VysR 8KrR7XleSzec+J5EtjJpnrslkPqyrII+hMzbcz0e7jfzwI4y6gLuRGKt/66ofJFfX3xmD0Sla 6vR6Z9Tz9DcZj5FmvkzIbu4QoUw5yDiT1Su6WwnycIknizV6pzhdV06wEJn4rh+gvfzy/OQ1J jGCcRzXie/sDe4M6oKaO5idpC2O4FDKU8r3CADkhxkOjo88/Ru4TOuQYvOObtqhwzijtF7kTN dxLOIiRvEhmArWOGQIQHpwQ+Vok5aLeusZjvbJyj5YQC3gXd6YI63XtuJmseDnWPRJRgeil43 zHEheX/XIu5V2mA2Y5LZ6Ns1ntAi6Gq7rXshuCzy++Wy4hqbzhQwTLxdSdNNmSiluHlkYCmeK LfbfoYEHRQ75kvipq2BVQOCMs0UivcqIjiZYTf3Rf5lTeNGyfnaqwuH2YLxH8o2ukWEKTNDWa PEDmGsOi1O7JVd7GzFRGyIg6cX7lPpHbyBROAc/YJcXSngLjscgclKPZPv3rBOYeT0VOWUYPs t0Yzxv/1FTHfmRKlOmZeu+LyaFsqqRH3I7nFya97JzxC+idNo016nohACZmVCyLDfuHqwhXQu 6vN2SFNQk/Os5Z4qPOD80zVm2dQny8cGhzomji38B1sSPhilNUhb6iuRrCOo93Pk5MBZ1igwG KzSPAFDOanVQXPwaCMM8UYnB6MeojnP6fCygSvx8BmpYEyakGM84jNNOUcHY7+8GDSU1WQJ0w sYMNeaaTLz5f0chn8ZMxYTDFcrpyV1V9IgB4MHxq+t4ffIKq0IwoACfs/bmE= X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 34343 Cc: 34343@debbugs.gnu.org, =?utf-8?Q?Felici=C3=A1n_N=C3=A9meth?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Dmitry Gutov writes: > But most importantly for now: tramp-handle-file-remote-p does not take > up the majority of time spent in > file-remote-p. tramp-file-name-handler does: > > ELISP> (benchmark 10000 '(file-remote-p "/ssh:abc@def.com:/%d" > nil t)) > "Elapsed time: 3.535115s (2.112970s in 27 GCs)" > > ELISP> (benchmark 10000 '(tramp-handle-file-remote-p > "/ssh:abc@def.com:/%d" nil t)) > "Elapsed time: 0.780867s (0.645621s in 8 GCs)" > > ELISP> (benchmark 10000 '(find-file-name-handler "/ssh:abc@def.com:/" > 'file-remote-p)) > "Elapsed time: 0.070135s" > > ELISP> (benchmark 10000 '(tramp-file-name-handler 'file-remote-p > "/ssh:abc@def.com:/%d" nil t)) > "Elapsed time: 3.409674s (2.070461s in 27 GCs)" > > And that function does a lot of things that I'm not sure we need to > just get the remote id. Yes. But in case you want to be generic (handling all possible remote file names, not only the Tramp implementation), you must use the file name handler implementation, as it is described in (info "(elisp) Magic File Names") In case you want to go your own path, I could provide you an own tramp-file-local-name function, which bypasses this mechanism: --8<---------------cut here---------------start------------->8--- ;; This function bypasses the file name handler approach. It is NOT ;; recommended to use it in any package if not absolutely necessary, ;; because it won't work for remote file names not supported by Tramp. ;; However, it is more performant than `file-local-name', and might be ;; useful where performance matters, like in operations over a bulk ;; list of file names. (defun tramp-file-local-name (file) "Return the local name component of FILE. This function removes from FILE the specification of the remote host and the method of accessing the host, leaving only the part that identifies FILE locally on the remote system. FILE must be a string that matches `tramp-file-name-regexp'. The returned file name can be used directly as argument of =E2=80=98process-file=E2=80=99, =E2=80=98start-file-process=E2=80=99, or = =E2=80=98shell-command=E2=80=99." (and (tramp-tramp-file-p file) (string-match (nth 0 tramp-file-name-structure) file) (match-string (nth 4 tramp-file-name-structure) file))) --8<---------------cut here---------------end--------------->8--- Here are the performance figures for local and remote files. I still use the dolist construct in order to have different file names for every file-local-name call; this avoids possible caching effects. --8<---------------cut here---------------start------------->8--- (benchmark-run-compiled nil (let* ((dir "/path") (remote (file-remote-p dir))) (dotimes (i 10000) (if remote (tramp-file-local-name (format "%s/%d" dir i)) (format "%s/%d" dir i))))) (0.09890154 1 0.07902910999999996) --8<---------------cut here---------------end--------------->8--- --8<---------------cut here---------------start------------->8--- (benchmark-run-compiled nil (let* ((dir "/ssh:abc@def.com:/path") (remote (file-remote-p dir))) (dotimes (i 10000) (if remote (tramp-file-local-name (format "%s/%d" dir i)) (format "%s/%d" dir i))))) (0.370237273 2 0.05851823899999997) --8<---------------cut here---------------end--------------->8--- So it is four times slower for remote file names, but I believe the numbers are acceptable. At least compared with file-local-name. From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 06 09:33:18 2020 Received: (at 34343) by debbugs.gnu.org; 6 Jan 2020 14:33:18 +0000 Received: from localhost ([127.0.0.1]:45340 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ioTRW-0006Za-0T for submit@debbugs.gnu.org; Mon, 06 Jan 2020 09:33:18 -0500 Received: from mail-lj1-f170.google.com ([209.85.208.170]:40977) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ioTRT-0006ZG-CC for 34343@debbugs.gnu.org; Mon, 06 Jan 2020 09:33:15 -0500 Received: by mail-lj1-f170.google.com with SMTP id h23so51144380ljc.8 for <34343@debbugs.gnu.org>; Mon, 06 Jan 2020 06:33:15 -0800 (PST) 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; bh=1xzhbwYDKufvEB8T9Cpd5ismmLyrCfhagDYbbDi6kbM=; b=grdImzf3KNvw9U2LwVaWOxiMA2le/tUoYOb8ey7f2zU3LHPqU723rgn/0aLhputngg 8uanYh+nFIO4IQYEPKyCPBzNR+MW24MjxgtRue94hqAbOQhWAW0p2KDp/0uIY9fjbCRx aNk5/LRLNN5TlU9eGZdISBI0RzU1OoXKmDtu0+Bj4S2gLw060ZnjPWphh3HobVKlzX/R KqbA4eVCgw0RVPHv5jl3TR4Fstj8JwMUW/J8ENXEHzPkjCwVQ4Mehm6lXXSkOZer4Y3W cuzOXuIPs/i9Ynmv7tdJFfU9UhRdM+wQjNgnkk4z1K9sk+rRGhRuhPrKarTkmgpDhaJS fopw== 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; bh=1xzhbwYDKufvEB8T9Cpd5ismmLyrCfhagDYbbDi6kbM=; b=kIOo+9OEM4HSSXyu6RaWRcy+IaxfLGVJN162kEJfxxNCBVhgrUeTdBOdHETSWlucvu MClrZj8TjeZUcJvyWurcWDAd723HJZrWn8sAUN2ZmP9Pqeggz2awnOl9a9ODmQLmv/by ptCnr9Wb68VYZmeDAR0xfIvwuN7xfu/Pgso3vtU7vnbBvtL1LL4MTALWQR/RoTeyU5Ko p2T3aYam4txlxdVyrEJS3hSef5nzN66hbOPtKDXcz7l4UjD7O3Mm6gT5oDhpy1tiWl3D +2zvq89NaJypktk6iuMZsHL3hgdAWryycJ+8+MJlLJKf1TmnBrKqyAojpsNMEVmK02e/ zwpA== X-Gm-Message-State: APjAAAXeNKMp4JE96DK3r+nIFBpfCqnDqRVwAXP4T4Rurc+X2f8ikhgj 1Y7VF5xCDeIYa4qcuesZxn1gnJbC6Lg= X-Google-Smtp-Source: APXvYqy9oK8dhhpjIjNFesJSBxklCdvDVm7Plo90WdsNK0ioA/IIqLFReftNSTgeIZnxZBYXUcdXjQ== X-Received: by 2002:a2e:3608:: with SMTP id d8mr59366522lja.152.1578321188841; Mon, 06 Jan 2020 06:33:08 -0800 (PST) Received: from [192.168.1.142] ([178.252.127.239]) by smtp.googlemail.com with ESMTPSA id k24sm34725206ljj.27.2020.01.06.06.33.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Jan 2020 06:33:07 -0800 (PST) Subject: Re: bug#34343: [PATCH] Make project--find-regexp-in-files work with remote files To: Michael Albinus References: <87r2bt1tio.fsf@gmx.de> <2cfd53b2-8202-a321-a853-da0c949b0f15@yandex.ru> <6cf8bfa8-3873-d3db-9139-854359027e8a@yandex.ru> <87h81mqiq5.fsf@gmx.de> <0ff03b20-20d8-b6c0-c876-3fd525586180@yandex.ru> <87mubdps6s.fsf@gmx.de> <87blrsz3tf.fsf@gmx.de> <87blrrmht9.fsf@gmx.de> <87tv5fs6kf.fsf@gmx.de> <7a1e2e22-89d4-b8b9-6cd4-e6947436138c@yandex.ru> <87mub6uoa6.fsf@gmx.de> <87blrksxco.fsf@gmx.de> From: Dmitry Gutov Message-ID: <81589ba9-0f93-599d-e55f-6605479454b0@yandex.ru> Date: Mon, 6 Jan 2020 17:33:06 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <87blrksxco.fsf@gmx.de> Content-Type: multipart/mixed; boundary="------------4B328464EC878798E2CB7E79" Content-Language: en-US X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi Michael, On 03.01.2020 11:28, Michael Albinus wrote: > Yes. But in case you want to be generic (handling all possible remote > file names, not only the Tramp implementation), you must use the file > name handler implementation, as it is described in > ( [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (raaahh[at]gmail.com) 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [178.252.127.239 listed in dnsbl.sorbs.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.208.170 listed in list.dnswl.org] 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different X-Debbugs-Envelope-To: 34343 Cc: 34343@debbugs.gnu.org, =?UTF-8?B?RmVsaWNpw6FuIE7DqW1ldGg=?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) This is a multi-part message in MIME format. --------------4B328464EC878798E2CB7E79 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Hi Michael, On 03.01.2020 11:28, Michael Albinus wrote: > Yes. But in case you want to be generic (handling all possible remote > file names, not only the Tramp implementation), you must use the file > name handler implementation, as it is described in > (info "(elisp) Magic File Names") As I've shown before, the generic dispatch is far from being the bottleneck at the moment. tramp-file-name-handler doing a lot of unrelated work is what takes the most time. > In case you want to go your own path, I could provide you an own > tramp-file-local-name function, which bypasses this mechanism: Thank you. I see you've already pushed this function to the release branch. I could use it like this, sure, but we can have a significant performance improvement and keep the generic-ness at the same time. The simplest option is below. It works fast enough in my testing (*); a bit slower than calling tramp-file-local-name directly, but not by much. Certainly much faster than the current state of affairs. It's a bit messy, but I'm not sure how to structure the resulting function best. There are several ways, though. What do you think? (*) The 1'000'000 files example was an extreme one, to optimize for when files are local. The 10'000 file project is a real one, on the other hand. P.S. BTW, I think our convention is not to call save-match-data unless obviously required. If the caller needs to save the match data, it will use it itself. --------------4B328464EC878798E2CB7E79 Content-Type: text/x-patch; name="tramp-local-name.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="tramp-local-name.diff" diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 85330e98aa..34438bd276 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -2322,6 +2322,9 @@ tramp-locker (defun tramp-file-name-handler (operation &rest args) "Invoke Tramp file name handler for OPERATION and ARGS. Fall back to normal file name handler if no Tramp file name handler exists." + (if (and (eq operation 'file-remote-p) + (eq (cadr args) 'localname)) + (tramp-file-local-name (car args)) (let ((filename (apply #'tramp-file-name-for-operation operation args)) ;; `file-remote-p' is called for everything, even for symbolic ;; links which look remote. We don't want to get an error. @@ -2415,7 +2418,7 @@ tramp-file-name-handler ;; When `tramp-mode' is not enabled, or the file name is quoted, ;; we don't do anything. - (tramp-run-real-handler operation args)))) + (tramp-run-real-handler operation args))))) (defun tramp-completion-file-name-handler (operation &rest args) "Invoke Tramp file name completion handler for OPERATION and ARGS. --------------4B328464EC878798E2CB7E79-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 06 12:30:09 2020 Received: (at 34343) by debbugs.gnu.org; 6 Jan 2020 17:30:09 +0000 Received: from localhost ([127.0.0.1]:46644 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ioWCe-0000iO-Kn for submit@debbugs.gnu.org; Mon, 06 Jan 2020 12:30:08 -0500 Received: from mail-wr1-f50.google.com ([209.85.221.50]:40956) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ioWCc-0000gF-Qa for 34343@debbugs.gnu.org; Mon, 06 Jan 2020 12:30:07 -0500 Received: by mail-wr1-f50.google.com with SMTP id c14so50542099wrn.7 for <34343@debbugs.gnu.org>; Mon, 06 Jan 2020 09:30:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:face:mime-version:content-transfer-encoding; bh=wgIEs+6d90/SF/f/8w3no0ID09MZTJ9RR50lHSuJf0M=; b=skrNjtEWROQ9fXEZGPwAAr9dNw371rAimXFiAWJDbwOuYtYYIqRF3ZVn49sCJ+JDUB vcQKk3N7ku3rcQTIsPbSdPfb0cKAvsyZtNeSoajUh7u0wsYlSaMIeSoh/m1C8i3RInxW MREe/3/NcxVjyY/nAJx3Gjq2Er9oq8vWM0omeyxbJQGNT9EfvoVjxFvStDQzfuDd5rfh FQOtgPt8LvAygoxXck2iLxSqfpr9o+ELBk9V4NvJNe4kbHdWhwfBwq3NF/nJaT29IM0A GPeTPuYRbKs8Aog9Y8gjKVe9eCEURgvQA4b74gOhp12dITwNCl/PT4MsI7FKmAu6Bzf8 Qxug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:face:mime-version:content-transfer-encoding; bh=wgIEs+6d90/SF/f/8w3no0ID09MZTJ9RR50lHSuJf0M=; b=EvUGF+BMB1Eq5pPtYB7EnngxE1FJJAQGnO907Ppj7EziylHzOUynSSS+FC+kgPqMp2 XJ078PfL6p66kxyYPenqiFAEf5+jJzKtUGNRHdJ7CFfH+ALb7NrAsjzlWTIVp5sPmvhc rNZJ87+DSkvjQFjCdHvhazTPrtan0ni2VjyJ/XV3py27XSi+v/26YQn/KtCDF45DPjO9 Yg9Us78gcyKnl9fiLOWJEqy/kmFJE9nz3nZMh+u/vqr0DGHIf4YRguNpYpUFrXi0Skar dYiPfCrqG8TJCsbqNRMnRjaldgKhMDdAa0zUC8WqZuPvEP8xZPKyuaz/iDabEhyTnSML Zu4w== X-Gm-Message-State: APjAAAUoQKqigR+rgdYGnDkwXhtFHoROrFsQjhGKTRmThep2b3iXtGLg o6h6wvXzIbkVoqJ4gJDaa4itG5Uo X-Google-Smtp-Source: APXvYqxsj9BmBW/BfWa0Jfu8VoUxUvbeLiz4Lcl5+ENkJ0NEBlF5nmWXaRP40iWXS11EMKjN9ElDOw== X-Received: by 2002:adf:f64b:: with SMTP id x11mr108759679wrp.355.1578331800725; Mon, 06 Jan 2020 09:30:00 -0800 (PST) Received: from betli.gmail.com (catv-178-48-82-41.catv.broadband.hu. [178.48.82.41]) by smtp.gmail.com with ESMTPSA id a133sm23557374wme.29.2020.01.06.09.29.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 06 Jan 2020 09:30:00 -0800 (PST) From: Felician Nemeth To: Dmitry Gutov Subject: Re: bug#34343: [PATCH] Make project--find-regexp-in-files work with remote files References: <9d65284f-7a64-5e9c-ab02-fbbd1be41689@yandex.ru> <87r2bt1tio.fsf@gmx.de> <2cfd53b2-8202-a321-a853-da0c949b0f15@yandex.ru> <6cf8bfa8-3873-d3db-9139-854359027e8a@yandex.ru> <87h81mqiq5.fsf@gmx.de> Date: Mon, 06 Jan 2020 18:29:58 +0100 In-Reply-To: <87h81mqiq5.fsf@gmx.de> (Michael Albinus's message of "Fri, 27 Dec 2019 09:24:18 +0100") Message-ID: <87a770trvt.fsf@betli.tmit.bme.hu> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAFVBMVEUMBwgHAgMFAAGPjY7/ //80MDHq6eqJt3pKAAABr0lEQVQ4jX2UzZKDIAzHqR177q7TPbtx2HMr6guQcrbY9txZ0fd/hA0f onXazcEJ/CD8E4Js8/HS9mwjXtqeMRxHXJkakTEm4b4GPVQW8PU8ov4fQCqeThlF60MBWdo1IXzd 2nEEZE7CEAZLwI0N/gJAhTj7ESQAX4gPgO8lyI+cvgViSVPlNomAj2M9gW40eg7VWY3cATjUcyiO Z+i03cFruGLYoUR7VyU3HihdmCEVhoDN65FXkpbSxkomOzsTQN/gySaodGb9Gdi1oSRXP46gdBWh LcUKJNdeGCWac74GKakmne0aHCFvyqJPYLsCFAVlhRTvGdzMdLHqtgRyUulyXIAH7CYQ3AB0Nody JQhAkq/qtOnbjhxdzYDkXPxlH5y4WdUAeUcX1NVJ6GR7UQEYPGWoAnA36OQNn5lRRp38vHTAp9Br LoTmvlPPDoRCKzpjG1SXT89AaT5l456BamJuMcs+NIOMzJ/s5dI6yUVcrARlruwOebfdv6gunTn4 ww3+QjGBEn5suVyLHoSGvAqREuDLN+iqZ+VcFg+HBbsJUU9+FZthbez9T+bdb+kPv2Ls6ct3hTkA AAAASUVORK5CYII= MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 34343 Cc: 34343@debbugs.gnu.org, Michael Albinus X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Dmitry, >> So I've pushed a more simplistic patch to emacs-27 (commit be38e39fcc). >> >> Felici=E1n and Michael, please take a look. I ran some simple tests and project-file-regexp on a remote project also works for me. I cannot comment on the performance issues but I'm grateful for your and Michael's work on that.=20 (I guess it's an independent issue, because it seems project-search is implemented differently, but if I project-search for something and the point is below a match in a non-visible buffer, then project-search pops the buffer, but doesn't move the point to the matching string.) Thanks, Felici=E1n From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 06 13:48:11 2020 Received: (at 34343) by debbugs.gnu.org; 6 Jan 2020 18:48:11 +0000 Received: from localhost ([127.0.0.1]:46803 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ioXQB-0004lM-8B for submit@debbugs.gnu.org; Mon, 06 Jan 2020 13:48:11 -0500 Received: from mout.gmx.net ([212.227.15.19]:34423) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ioXQ8-0004l8-Ot for 34343@debbugs.gnu.org; Mon, 06 Jan 2020 13:48:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1578336482; bh=YL5rixXXXOdpotGdgQk2PxB+FgkFR43pOJOxS+r71+4=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=LfexqtqRL1QRJdtuDW5HGAQVxInFFzvsRfFm0pqTmRh5RgQZs448f4qevWOPpS291 LOlKRZyzCqwvQt2xcMvlP4Rz1jVWL2e4NMc/KCOEZUtzxsYh37gtXTlt2EmnsVpp0w pKrFWN9E9u7gapq+HV/2Meg9t2DgIINrsk0x93Vo= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from detlef.gmx.de ([212.86.57.241]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N9MpS-1jkow146rc-015HKZ; Mon, 06 Jan 2020 19:48:02 +0100 From: Michael Albinus To: Dmitry Gutov Subject: Re: bug#34343: [PATCH] Make project--find-regexp-in-files work with remote files References: <87r2bt1tio.fsf@gmx.de> <2cfd53b2-8202-a321-a853-da0c949b0f15@yandex.ru> <6cf8bfa8-3873-d3db-9139-854359027e8a@yandex.ru> <87h81mqiq5.fsf@gmx.de> <0ff03b20-20d8-b6c0-c876-3fd525586180@yandex.ru> <87mubdps6s.fsf@gmx.de> <87blrsz3tf.fsf@gmx.de> <87blrrmht9.fsf@gmx.de> <87tv5fs6kf.fsf@gmx.de> <7a1e2e22-89d4-b8b9-6cd4-e6947436138c@yandex.ru> <87mub6uoa6.fsf@gmx.de> <87blrksxco.fsf@gmx.de> <81589ba9-0f93-599d-e55f-6605479454b0@yandex.ru> Date: Mon, 06 Jan 2020 19:48:00 +0100 In-Reply-To: <81589ba9-0f93-599d-e55f-6605479454b0@yandex.ru> (Dmitry Gutov's message of "Mon, 6 Jan 2020 17:33:06 +0300") Message-ID: <87y2ukjuan.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:la/F7g36LKdBGqidJ2BiqcwdudRUNcwAd5OOBA/NSBEI1IsAn1v 02L7RIkuJzDIPQ6PlqsotaO3uI1ZCNmEyyetyaiKum0hWY/Gp4sCs4gh0XpOZKJybqEQr8S 27q9mmy5SKdLaiwEQARPu8kMxWpuCjuuj1fIcprWdkQ1CKTZCa0n4rs0kjjrwWBEbz9r3s1 ZkQSLSnnT6Sh7lR+DDxLA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:fF1lxH9ysRo=:Hwtb2uYKIG3CVeKVKkQMz6 4jw1Moe9ZpfX+wSOt56hkGXEgsQ6++OGPRoz0xETFHi5tP3vlpqsmOyQHW0aqOUySEzYYMXwq d7lkAD1UOZHEleAczIh1ojxPU48de95p9qDIypFoxFX3INRQHU2sZ+UkkZM2DBrZ8+5oE/97+ k2Bvpr8d9NEWtPRdnF86imgbuMsEgpwBsRyk5rTnh0WYNEUmVoe5Nai3t6SPy1t0gdvyufuRJ hN0+Sk6fQrLTGqJm5/ampk2BgomGScbf3E7Ls45TIpsrPVwMdNwcEVbPmEgk0vhS7KB5sfCkR SFCeqo0F9kp33mqZek08u2bM5z3yNjKBI3spmWu9NClHdaM39BiMktLEvAvtEa1tNQFLJC62T 2Fed72Ks2c8c7XnJpKHH+sYhmkqhuXHXOdlhSnWrRjuq7zmdE0V0fwMuxeX7HZOxI46bYOxcf Ptau3l27NGGqJfHvceHuTtMdAE844mHCBlz474qdmC7yuWYzN1Lzdff0Ld1Gf11eYxJC0pObD zWxtjznWWPqLfrIfioOpZ9y2TuXFIsohHHZRyPvAzoJ8VLRAV8HYfN46rcKNmaX3HcNaXoJr0 59LSL5q12/fsUqYc/bTfJIzy8G30J+t9nw1PHboXSMt696Ji1W60l7l72VI6JY8U8cVasgkfE HjCcRtCKtfD61+zHP9pw9qqXPNJ5+3eyDZp7pY1l/iTnvLcHA63fEENrC9gCJE8Cm3m0tWCjd kYjOOQuZ43QqHa4M8Z6kxkjnD+E1LZ+r1OV9jI8LfgDHw9B/+ytmu4iq1j7GnzzjvKpkCCdUe M9cX/kN2aWgC7qoS3PnGKm4afd0qCylPosCl2YKm8p+oFTWMh49OLUkNphbXPbbpO6sflqLBU fquD8CfCYTrP065nTQ/LWTcKfGnxeLOFSseJG7WwLrn7dG1ydB15HVXvkN+XFVpg0wwd8tUQU 05a4woALBZ7GdLxJMFDiyYocPbdSF3X33mcyI6Y801BHJGUMUov7n9qZJR3bfRogHf3bWIUYJ yLnsvnAmjJrVdoQR43FfJQxfkzFGEzeKkXvQN9KQpaNWVLZxj8QD2Nhmv7nl6SBq7x1lyYF5/ AYYKfFq7ULnlRcxVAPi+EUxIORsOBPsVCDDn9wdR0Z2X4iU+gMnDXG9Q0uixF+jrE61bUOJ+9 4xfqS/onYbBY4xo9RXpyv2q+EO8hzmNGrAcACqcBeInrNndEoAnKXfKZbqYu0svy3f4kp45G1 liZblkmn4T1QdEAxVaE5sU6BihLzTexvNOuwBB+PtSqlRNdzmsNGOTMSvrMY= Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 34343 Cc: 34343@debbugs.gnu.org, =?utf-8?Q?Felici=C3=A1n_N=C3=A9meth?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Dmitry Gutov writes: > Hi Michael, Hi Dmitry, > As I've shown before, the generic dispatch is far from being the > bottleneck at the moment. tramp-file-name-handler doing a lot of > unrelated work is what takes the most time. It might be unrelated to yozur use case. But tramp-file-name-handler is the central heart of Tramp's file name handling. It ensures that the proper function is called; that a Tramp subpackage is autoloaded if needed; that there are no blocking situations due to simultaneous invocations from timers, filters, sentinels; that there are no unintended infloops; that Tramp events and errors are caught etc pp. In the Tramp repository, it is also responsible for thread handling. All of this must be applied for every file name operation, also for file-remote-p, even if you don't need some of this in your use case. >> In case you want to go your own path, I could provide you an own >> tramp-file-local-name function, which bypasses this mechanism: That's why I have provided this function. In order to avoid a call of file-local-name (which implies the call of file-remote-p). > I could use it like this, sure, but we can have a significant > performance improvement and keep the generic-ness at the same time. > > The simplest option is below. It works fast enough in my testing (*); > a bit slower than calling tramp-file-local-name directly, but not by > much. Certainly much faster than the current state of affairs. > > It's a bit messy, but I'm not sure how to structure the resulting > function best. There are several ways, though. What do you think? No. file-remote-p must pass the whole machinery. It isn't called only for your use case. And if we start such bypassing for a file name operation, we will end in unmaintainability soon. Over the years, there has been often the temptation to bypass this or that file name operation, similar to your approach. Sometimes I even did, but soon I have reverted such exceptions. Tramp isn't maintainable any longer, if we introduce such coding style. Subtle errors you have no idea where they come from. In general, there's no problem calling tramp-file-name-handler, because the remote operations take much more time. This machinery is neglectable then. Your use case is different, because you do not trigger any remote operation. > P.S. BTW, I think our convention is not to call save-match-data unless > obviously required. If the caller needs to save the match data, it > will use it itself. Well, as you might have seen with my recent commit in master, I intend to use tramp-file-local-name internally. At some places it seems to be necessary to protect match data. Well, I will analyze all these calls, and maybe there are only one or two places. In this case I can remove save-match-data from the function, and apply it directly where needed. Let's see. Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 06 22:23:51 2020 Received: (at 34343) by debbugs.gnu.org; 7 Jan 2020 03:23:51 +0000 Received: from localhost ([127.0.0.1]:47118 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iofTD-0003UG-9Q for submit@debbugs.gnu.org; Mon, 06 Jan 2020 22:23:51 -0500 Received: from mail-lj1-f171.google.com ([209.85.208.171]:38417) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iofTB-0003U1-F9 for 34343@debbugs.gnu.org; Mon, 06 Jan 2020 22:23:49 -0500 Received: by mail-lj1-f171.google.com with SMTP id w1so31175674ljh.5 for <34343@debbugs.gnu.org>; Mon, 06 Jan 2020 19:23:49 -0800 (PST) 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=RyN6Iy3qyYp9lXz4HyGPggftDKI7JV/0pa69q00w2fk=; b=YAqP3nTaFt7K5h8dPYuLZBgSbDBkXhXKS+MNc1WS/GhbzGcGvgQ30nkOxS0+GtayqJ kYDxUy6LVmijJRKkDUdv8jPqvAT9aZB2vMJ0/gsUGkqx3oPlqqE7vq0p04wO5oW7BFBz YLFM86reLxVpTz6NbXcfo7Hi6wAH46C4sSZQVhKBxb1+pNUm04nt8dB8R6x5zS+1xqYm 7n1GDnPU5tFVTFEMlUa3cSeBOIdMPpKyk32M7CHnhr0QCOzwhp3lsytbD/QQEF5Q5pvE RDlvRMlBi+CiTaOL47DZK1pWBrVBSf3HOXJh/9VgO1HvMmVq6VxwbLfL9Bkb0DniYkUt hl0w== 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=RyN6Iy3qyYp9lXz4HyGPggftDKI7JV/0pa69q00w2fk=; b=bSxX6BYsTjDw7Z49PFDqb7FdQ+svOwYB3II/1Hln91LxAvs8vltSdEA13AfSLROmbB lUGVT6evhuCKw0+Gd44ZkmImtiCq9Zwz+rVrWQr+tdnSgybrZPQ1mi+lEjc9RaRn7rAF NlLhJp+nRYjvUFIq4lGXyqtMu10xt8xoaujqq/vJOfslHptoUcgWOly2/u4zBvqtPe8r q1reSSh2mKrlnT6eOrj3f5u46JJCunnSnPwICSpxeGZkK8sVchXsROGs2xogGU6yGaOw LvONEBACrKLljywpbloA2QzS+F/8fs65i7T59M3cTr5wGvOf/s2h2R/gsE+b6WficSXi v25Q== X-Gm-Message-State: APjAAAUxB0M9ScwIyafnBOeBJsC1yzf5DpWJ+YMgRW3IxQIq3EYLnBGt v+/ZUXbLGgGdVKJsuIo/W/WW52WflM0= X-Google-Smtp-Source: APXvYqyMWEkznvpL/Ha6IQ7iMvDpmm0ai7kP2j4NitCA6klXXFTTsa3NeNZ4m6vLOyydebkjvS8kqA== X-Received: by 2002:a2e:9b9a:: with SMTP id z26mr61215804lji.181.1578367423096; Mon, 06 Jan 2020 19:23:43 -0800 (PST) Received: from [192.168.1.142] ([178.252.127.239]) by smtp.googlemail.com with ESMTPSA id b63sm29805194lfg.79.2020.01.06.19.23.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Jan 2020 19:23:41 -0800 (PST) Subject: Re: bug#34343: [PATCH] Make project--find-regexp-in-files work with remote files To: Felician Nemeth References: <9d65284f-7a64-5e9c-ab02-fbbd1be41689@yandex.ru> <87r2bt1tio.fsf@gmx.de> <2cfd53b2-8202-a321-a853-da0c949b0f15@yandex.ru> <6cf8bfa8-3873-d3db-9139-854359027e8a@yandex.ru> <87h81mqiq5.fsf@gmx.de> <87a770trvt.fsf@betli.tmit.bme.hu> From: Dmitry Gutov Message-ID: <2fddb715-05d3-933d-f8c8-893e2dd3c3ce@yandex.ru> Date: Tue, 7 Jan 2020 06:23:40 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <87a770trvt.fsf@betli.tmit.bme.hu> Content-Type: text/plain; charset=iso-8859-2; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On 06.01.2020 19:29, Felician Nemeth wrote: > I ran some simple tests and project-file-regexp on a remote project also > works for me. I cannot comment on the performance issues but I'm > grateful for your and Michael's work on that. Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (dgutov[at]yandex.ru) 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [178.252.127.239 listed in dnsbl.sorbs.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.208.171 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.208.171 listed in wl.mailspike.net] 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different X-Debbugs-Envelope-To: 34343 Cc: 34343@debbugs.gnu.org, Michael Albinus X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) On 06.01.2020 19:29, Felician Nemeth wrote: > I ran some simple tests and project-file-regexp on a remote project also > works for me. I cannot comment on the performance issues but I'm > grateful for your and Michael's work on that. Very good, thanks for checking. > (I guess it's an independent issue, because it seems project-search is > implemented differently, but if I project-search for something and the > point is below a match in a non-visible buffer, then project-search pops > the buffer, but doesn't move the point to the matching string.) It is. Please file a new bug report with a step-by-step repro, and we'll forward it to someone better qualified to respond. From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 06 22:23:54 2020 Received: (at 34343) by debbugs.gnu.org; 7 Jan 2020 03:23:55 +0000 Received: from localhost ([127.0.0.1]:47121 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iofTG-0003UV-JX for submit@debbugs.gnu.org; Mon, 06 Jan 2020 22:23:54 -0500 Received: from mail-lf1-f67.google.com ([209.85.167.67]:41527) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iofTF-0003U6-2V for 34343@debbugs.gnu.org; Mon, 06 Jan 2020 22:23:53 -0500 Received: by mail-lf1-f67.google.com with SMTP id m30so37801908lfp.8 for <34343@debbugs.gnu.org>; Mon, 06 Jan 2020 19:23:53 -0800 (PST) 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=RUhKGEbvkNMVZIXd60SwCniO9rW5xv6MJ422c8BKrH0=; b=o1redXSAGAROvox5pYMbh+WfTzPUzwnrCFgPXtyiDyTTvLejz9Cy8H/qY5mpaZ7qZS 40q4PZCHOeALHUPLTb1fKJGbBOX+0EVanHnMSUEpMrG79EzluuZseTpsJGAt/slFhoX4 gO+1a5cbul0k9ZI1eAeTeqHbpP4ctQuFjqy6Kz5Uf0RBhP5UB2fPtU7YSKPXcci6DWE9 DY1IHIG+vMqPtHAIvv0cpssntqwLzw8LfPpn7VBCxJdSEDQ6aAzWPsNFaL/Cb6EHVp/6 3i+ivZ0LOICrCX/3BYhPIIwX53a2riQAukSqWeB3r0qn+sLXxrsJSomusoPwKxnHo63/ BLzg== 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=RUhKGEbvkNMVZIXd60SwCniO9rW5xv6MJ422c8BKrH0=; b=Jrs1+/GBlmEAFp5w5N/wzCYdh4gDfVgWbcoa/9qH9/lF7oXzF7bhs1AThVpOb58k3N 8VPlo8fyZCSdq+PVvljcTg7zgAZ0cm3D0mCL7K8OQxrx/yIZ1x2mpQhwjXelX4b8XaV7 6Sm8mR1mp0un7EDTfBxzYRd6/TbOfuO6fgt+UK1PsIz/iKLODfG0p7VGMuPPe3D6GFyW 8jLVe7J9sPO1jG2qtONeTuXKIUdjVZTf8fakHVkOcvqklhQBuLwMmFbg3Y3/b4VJFiVy Z01bkO8l9w3N3REZGfQ0s+fgWboMsJ10u6rOLFTavXK9OC2FDvhui0TuMKdx702TPIzq A4ww== X-Gm-Message-State: APjAAAVC6/E6wKkSAd52zYNMrlkIc/rg4/JcffZ9p7KUoG+8jOaYUTi/ PPK+AskV9Y5n4FeVRbJho1GQeyMtJ7c= X-Google-Smtp-Source: APXvYqwfuAEfPTqbPrDGiyqLZsaqoBlA7++ROK4xvMAcdpMGEAgLXG91qf2hIcAVVHPxoRqSbxhhQw== X-Received: by 2002:ac2:430d:: with SMTP id l13mr62144165lfh.112.1578367426731; Mon, 06 Jan 2020 19:23:46 -0800 (PST) Received: from [192.168.1.142] ([178.252.127.239]) by smtp.googlemail.com with ESMTPSA id w20sm23873234ljo.33.2020.01.06.19.23.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Jan 2020 19:23:46 -0800 (PST) Subject: Re: bug#34343: [PATCH] Make project--find-regexp-in-files work with remote files To: Michael Albinus References: <87r2bt1tio.fsf@gmx.de> <2cfd53b2-8202-a321-a853-da0c949b0f15@yandex.ru> <6cf8bfa8-3873-d3db-9139-854359027e8a@yandex.ru> <87h81mqiq5.fsf@gmx.de> <0ff03b20-20d8-b6c0-c876-3fd525586180@yandex.ru> <87mubdps6s.fsf@gmx.de> <87blrsz3tf.fsf@gmx.de> <87blrrmht9.fsf@gmx.de> <87tv5fs6kf.fsf@gmx.de> <7a1e2e22-89d4-b8b9-6cd4-e6947436138c@yandex.ru> <87mub6uoa6.fsf@gmx.de> <87blrksxco.fsf@gmx.de> <81589ba9-0f93-599d-e55f-6605479454b0@yandex.ru> <87y2ukjuan.fsf@gmx.de> From: Dmitry Gutov Message-ID: <10dbccdd-99e8-883b-01e6-e8d3bc1e195e@yandex.ru> Date: Tue, 7 Jan 2020 06:23:45 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <87y2ukjuan.fsf@gmx.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On 06.01.2020 20:48, Michael Albinus wrote: > Dmitry Gutov writes: > >> Hi Michael, > > Hi Dmitry, > >> As I've shown before, the generic dispatch is far from being the >> bottleneck at the moment. [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [178.252.127.239 listed in dnsbl.sorbs.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (dgutov[at]yandex.ru) 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: yandex.ru] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.167.67 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.167.67 listed in wl.mailspike.net] 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different X-Debbugs-Envelope-To: 34343 Cc: 34343@debbugs.gnu.org, =?UTF-8?B?RmVsaWNpw6FuIE7DqW1ldGg=?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) On 06.01.2020 20:48, Michael Albinus wrote: > Dmitry Gutov writes: > >> Hi Michael, > > Hi Dmitry, > >> As I've shown before, the generic dispatch is far from being the >> bottleneck at the moment. tramp-file-name-handler doing a lot of >> unrelated work is what takes the most time. > > It might be unrelated to yozur use case. As far as I can tell, it's unrelated to 'file-local-name' altogether, not just my use case. > But tramp-file-name-handler is > the central heart of Tramp's file name handling. It ensures that the > proper function is called; that a Tramp subpackage is autoloaded if > needed; that there are no blocking situations due to simultaneous > invocations from timers, filters, sentinels; that there are no > unintended infloops; that Tramp events and errors are caught etc pp. In > the Tramp repository, it is also responsible for thread handling. All of > this must be applied for every file name operation, also for > file-remote-p, even if you don't need some of this in your use case. I believe it's an incidental detail that file-local-name is implemented through file-remote-p. Maybe we could also introduce a new operation as well. >>> In case you want to go your own path, I could provide you an own >>> tramp-file-local-name function, which bypasses this mechanism: > > That's why I have provided this function. In order to avoid a call of > file-local-name (which implies the call of file-remote-p). I can use it, and I will if I can't convince you otherwise, but we *can* keep operation both fast and generic at the same time, so... why not, really? > No. file-remote-p must pass the whole machinery. It isn't called only > for your use case. Hence the double check which verifies that the second argument is 'localname'. > And if we start such bypassing for a file name operation, we will end in > unmaintainability soon. Over the years, there has been often the > temptation to bypass this or that file name operation, similar to your > approach. Sometimes I even did, but soon I have reverted such > exceptions. Tramp isn't maintainable any longer, if we introduce such > coding style. Subtle errors you have no idea where they come from. It's up to you, but having an alist of exceptions should be both maintainable and readable. Like most other file handlers do (e.g. epa-file-handler) which maintain mappings of operations to functions. > In general, there's no problem calling tramp-file-name-handler, because > the remote operations take much more time. This machinery is neglectable > then. Your use case is different, because you do not trigger any remote > operation. Would any use of file-local-name trigger a remote operation? >> P.S. BTW, I think our convention is not to call save-match-data unless >> obviously required. If the caller needs to save the match data, it >> will use it itself. > > Well, as you might have seen with my recent commit in master, I intend > to use tramp-file-local-name internally. At some places it seems to be > necessary to protect match data. Not in the case of the new proposed use in project.el either. Anyway, the idea is only to do that where necessary to squeeze just a little bit of more performance in places that don't need to protect match data. From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 07 04:20:07 2020 Received: (at 34343) by debbugs.gnu.org; 7 Jan 2020 09:20:07 +0000 Received: from localhost ([127.0.0.1]:47257 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iol1z-0004e2-Du for submit@debbugs.gnu.org; Tue, 07 Jan 2020 04:20:07 -0500 Received: from mout.gmx.net ([212.227.17.22]:45849) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iol1v-0004dS-J5 for 34343@debbugs.gnu.org; Tue, 07 Jan 2020 04:20:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1578388796; bh=TbBy+fTGDMLXDPE6X0cftkP/L+dS2izOD+7h64jgyUM=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=McujEHkx84ZEF5GSNW+64ohE3yVivpXtkSJemMFDEDKapNj8vzOZ59IS+vgGHrKcm P//04aKhBvzFVUcUxBZCdc2p/zJoBW5Lg1vJcRyqJjiOQTlFGLGIHf3ylugyaagXzS WB3Q51QRGnPBJ+sgJ58ZkZdc4lxaW1Y563QbXFNk= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from detlef.gmx.de ([212.91.238.170]) by mail.gmx.com (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MkYbu-1jYZ9u2v3W-00m3Wt; Tue, 07 Jan 2020 10:19:56 +0100 From: Michael Albinus To: Dmitry Gutov Subject: Re: bug#34343: [PATCH] Make project--find-regexp-in-files work with remote files References: <2cfd53b2-8202-a321-a853-da0c949b0f15@yandex.ru> <6cf8bfa8-3873-d3db-9139-854359027e8a@yandex.ru> <87h81mqiq5.fsf@gmx.de> <0ff03b20-20d8-b6c0-c876-3fd525586180@yandex.ru> <87mubdps6s.fsf@gmx.de> <87blrsz3tf.fsf@gmx.de> <87blrrmht9.fsf@gmx.de> <87tv5fs6kf.fsf@gmx.de> <7a1e2e22-89d4-b8b9-6cd4-e6947436138c@yandex.ru> <87mub6uoa6.fsf@gmx.de> <87blrksxco.fsf@gmx.de> <81589ba9-0f93-599d-e55f-6605479454b0@yandex.ru> <87y2ukjuan.fsf@gmx.de> <10dbccdd-99e8-883b-01e6-e8d3bc1e195e@yandex.ru> Date: Tue, 07 Jan 2020 10:19:54 +0100 In-Reply-To: <10dbccdd-99e8-883b-01e6-e8d3bc1e195e@yandex.ru> (Dmitry Gutov's message of "Tue, 7 Jan 2020 06:23:45 +0300") Message-ID: <87k163fwsl.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:yXgGym3yzfhjnhn5jdr6JoNWbjx8qlXKBERt1rQT53hRQ9Uo8Fo DUw8RsEqQvb0Hx0Am0KcOuH4EYBnwQmtTAQuqLOBBJOabKwXP8BTdm9v2G06AXvXWm+8Dx8 eunKGf4WfmmoDv4wT+e3mMxzrry4Zy/vGgq7iqGDLtIOulLdKdjm25g/2Bdo24iKCHrLKP1 cUiEFP8SSeACfewoJczDg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:g8a33bUw1Rc=:WzUYamLxg8TsMh3/ORhSjP z+msxvObu0r03FUdtEVwWHe5lPcDS9hZsxOjnzQl7vz8yDyiifXqE1YHpQTcVm2g9hzqrgsHE SeXaNe6AoxSm08Hl+FYshwybwHOV7RD3zn3rXD3ukshAUwjNkZiRPeUhnkflg4FRi0HpSonVS 90l/2y2z3h7nRioklhjhx9wOLc3EVeObp0IEQDE4kScy95Qt52IfnMY7f5Ziba6V8RONEtHg3 wm8xGmf5XgAsVGKWf5yvRTtx8OSVkMrGgtQ+34bexxSxo4Q5rgokR+96e17whQPqNLkBaj6qf CR4ZfbUFvCxJqD4Kwcrbo4YISDvLVFeyTvCDDMP736cTWn/L2BX+bEQA9YEEI6etnLjxUNZO4 LHixxRNQcZL+suWu+70yt1oJYp+8waTZ9FlAgVmzxu0WPUWoLQt4aPyFUHzndzoz4DJ6rmH9C 6sEtFMTngL83ekeBxc+z+vY6/PnUduyPegSw43OUo3ZZxXSNJKB5y7GxCwRzVbqQuhmItymDj Dzu5FsTiYK0UaA5yLjNnF6s48PzJBfy0HwVXTFKK1B0q5RX9FxPw9xhGkEonxdJhf24pe5iQK 1qzS8Jv/fIFvWpYRXRirlRNXLpyAX6FGBvakGcyF2sS1XkWbrb28B9Jv8y9AjqjZTWbIAIuKh 4QXP2p5blagnr8+UgjB646n3s5oxPiEn1A66KhSRu9ZuVrI28M4qBBhQQcNkRd5hY/V/jGqW3 CEwNQW7f7gLk7kwEl52HkLOX7tXHXTKM8xFl/cjLeqvcBU/jQ0frBgLTyg25LNHn7puRo1IIe rW3mJcxs9VFtQbWO90kOvKR0xiFh2xW6l7NZIPfR4qa8Mwpk9cmrMocMP+ECEdEmzeApHohic NFEoOyFhiXweI8/YsIIlyq+iBaJAOcJWeNrvMMAYfnMtchgfRUpAVX10pDT27pK7wQ8/OMof+ w+YXAe5ZpHE0Qy5lkkJLZxJrloW8ekVa346OE3fpW8+X9eyauIDrJktZ8wFt2fE4FIAWBR3ye Rgs0vaYiOI8v4zeVLZVWQtCD96XSMuPvflTrKAVCH0Ns1iUteQwyw4GeStZfVlVamutR6d8xa PogfaI4+LM3dBQA1pwu/eb0axqxgDP9nsWj2flgb7d3rPzzvyuFFJcB+ElrUGgZ7Vyh4jWv9w w37ufKwufEvKngg+auPxAn4adPYW4UtmI0lTJfs5H/Kil/aJf7qmAY5lDAouGFegcVoaUdYMW tnHswPbhvSb5btn/87USqBttw6p/vTRW4043wqHC1HecVt8MOyhUxTVqsytk= Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 34343 Cc: 34343@debbugs.gnu.org, =?utf-8?Q?Felici=C3=A1n_N=C3=A9meth?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Dmitry Gutov writes: Hi Dmitry, > I believe it's an incidental detail that file-local-name is > implemented through file-remote-p. Maybe we could also introduce a new > operation as well. I've done this, tramp-file-local-name :-) But I wonder how you want to extract a file name's local part w/o knowing how the remote part is identified. Again, we're not speaking only about Tramp. If you have a better proposal for file-local-name implementation I'm all ears. >>>> In case you want to go your own path, I could provide you an own >>>> tramp-file-local-name function, which bypasses this mechanism: >> That's why I have provided this function. In order to avoid a call >> of >> file-local-name (which implies the call of file-remote-p). > > I can use it, and I will if I can't convince you otherwise, but we > *can* keep operation both fast and generic at the same time, so... why > not, really? At least for Emacs 27.1 there won't be another solution. Eli is right, when he rejects any substantial change to the emacs-27 branch before Emacs 27.1 is released. >> No. file-remote-p must pass the whole machinery. It isn't called only >> for your use case. > > Hence the double check which verifies that the second argument is > 'localname'. > >> And if we start such bypassing for a file name operation, we will end i= n >> unmaintainability soon. Over the years, there has been often the >> temptation to bypass this or that file name operation, similar to your >> approach. Sometimes I even did, but soon I have reverted such >> exceptions. Tramp isn't maintainable any longer, if we introduce such >> coding style. Subtle errors you have no idea where they come from. > > It's up to you, but having an alist of exceptions should be both > maintainable and readable. Like most other file handlers do (e.g. > epa-file-handler) which maintain mappings of operations to functions. I told you already that I have bad experience with such exceptions. All of them I had to revert later, and I don't want to reopen this can of worms. epa-file-handler is different. In epa, there exist exactly one implementation for a given file name operation; in Tramp you have different implementations due to the subpackages. epa doesn't need to care about timers, filters, sentinels, threads AFAICT. epa cares about exactly two file name operations (insert-file-contents and write-region), Tramp is responsible for 71 file name operations. >> In general, there's no problem calling tramp-file-name-handler, because >> the remote operations take much more time. This machinery is neglectabl= e >> then. Your use case is different, because you do not trigger any remote >> operation. > > Would any use of file-local-name trigger a remote operation? No, it shouldn't. >> Well, as you might have seen with my recent commit in master, I >> intend to use tramp-file-local-name internally. At some places it >> seems to be necessary to protect match data. > > Not in the case of the new proposed use in project.el either. > > Anyway, the idea is only to do that where necessary to squeeze just a > little bit of more performance in places that don't need to protect > match data. I'll check today how I could remove save-match-data. OTOH, the version of tramp-file-local-name in master handles also the case that the argument is NOT a remote file name, but a local one. Needed in my Tramp internal use cases. I will backport this to the emacs-27 branch, that you could also profit from if you want. It does not cause a performance penalty for remote file names; an additional `or' shouldn't hurt. Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 07 08:40:22 2020 Received: (at 34343) by debbugs.gnu.org; 7 Jan 2020 13:40:22 +0000 Received: from localhost ([127.0.0.1]:47550 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iop5q-0006mj-1s for submit@debbugs.gnu.org; Tue, 07 Jan 2020 08:40:22 -0500 Received: from mail-lj1-f193.google.com ([209.85.208.193]:39894) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iop5n-0006mW-Ka for 34343@debbugs.gnu.org; Tue, 07 Jan 2020 08:40:20 -0500 Received: by mail-lj1-f193.google.com with SMTP id l2so54752516lja.6 for <34343@debbugs.gnu.org>; Tue, 07 Jan 2020 05:40:19 -0800 (PST) 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=JeOQE0Id3bgV+gcUwXrKeSWFji13TyJVsLzqDnvhVYA=; b=fVMuNH+Itfn7QNArS/dtutkBp1J3k4QxDEP16Ho57Ju2Lx49lFE71VNfBTM/IMwmxj 0TgizfhIL3uqwNbYCYeCjIJtk2Kr2U+k/wLGQLu022BjQ92k4u8Lc89MoiAyhDkSkiFW qdQ1JofRwAWWRGGqOfu6f1QavTpIU22c0iToIiaskhBIHdUzwqB3sCkQFXULEkc4XUhM /Yt0kBC3sbdGqAG+7b0X2lm6d/V700Cqz+UnUN3a3Z9bYu2uLvDBax0zYm9NcfH6Xq5C y3jcdbxZitGlkvY81w4kRFZdKLDxWBLtJYz1JvnJr2eiI/++jzJ51ja+AOQxchzOD81q GkPw== 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=JeOQE0Id3bgV+gcUwXrKeSWFji13TyJVsLzqDnvhVYA=; b=k6GhDjS+tFMx5kJab1ilHzi52931za/QtJcy5/iAfonEK1ZpryzmrLlTEsZhP4UOBc ht9gZb6PAjtnapebFw5GRyhV88gCamJoHqmAPhMxDKuoNMEZaYJbmd+Rfv3Lvay4mLHR vwMdvHNw1Ibh25Tpzm8SrO+my98I0OU/JH+7gxljmuYgisP3j68jPAuTDkLOkUTaGw+J w5g1iSjSYg5BP+W7zAZYpLZDpvOnGsRZtL17yTUP7JZaUkWqqdoKTF30SmHs7kbQ8F0p A44acNPKj+Dn6oSrzJLzaVrt9y/A2oKotPyXfZ3hxVponOiO6EmlbJjrm/J8OxQH1UmW rZyw== X-Gm-Message-State: APjAAAXrc+cj+rpzsHQrj06IeFwMH/VDI8qfQMBkIeae2uF0ixEzukrb 3z+lZfjUCJd6mu/G/FW5IeUIs4rIhPg= X-Google-Smtp-Source: APXvYqzPZmlJwqh1Z27/HKrtwmWX/XeA4KOTMrqtDaMQJP3PZJUfVf1bVLQzg1c1Rt9hy8YEtLejCw== X-Received: by 2002:a2e:8197:: with SMTP id e23mr55960261ljg.250.1578404413388; Tue, 07 Jan 2020 05:40:13 -0800 (PST) Received: from [192.168.1.142] ([178.252.127.239]) by smtp.googlemail.com with ESMTPSA id y23sm30912228ljk.6.2020.01.07.05.40.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Jan 2020 05:40:11 -0800 (PST) Subject: Re: bug#34343: [PATCH] Make project--find-regexp-in-files work with remote files To: Michael Albinus References: <2cfd53b2-8202-a321-a853-da0c949b0f15@yandex.ru> <6cf8bfa8-3873-d3db-9139-854359027e8a@yandex.ru> <87h81mqiq5.fsf@gmx.de> <0ff03b20-20d8-b6c0-c876-3fd525586180@yandex.ru> <87mubdps6s.fsf@gmx.de> <87blrsz3tf.fsf@gmx.de> <87blrrmht9.fsf@gmx.de> <87tv5fs6kf.fsf@gmx.de> <7a1e2e22-89d4-b8b9-6cd4-e6947436138c@yandex.ru> <87mub6uoa6.fsf@gmx.de> <87blrksxco.fsf@gmx.de> <81589ba9-0f93-599d-e55f-6605479454b0@yandex.ru> <87y2ukjuan.fsf@gmx.de> <10dbccdd-99e8-883b-01e6-e8d3bc1e195e@yandex.ru> <87k163fwsl.fsf@gmx.de> From: Dmitry Gutov Message-ID: <7d46d704-6bcb-391c-64bb-4a443a88130d@yandex.ru> Date: Tue, 7 Jan 2020 16:40:10 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <87k163fwsl.fsf@gmx.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On 07.01.2020 11:19, Michael Albinus wrote: > Dmitry Gutov writes: > > Hi Dmitry, > >> I believe it's an incidental detail that file-local-name is >> implemented through file-remote-p. Maybe we coul [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: yandex.ru] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (raaahh[at]gmail.com) 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.208.193 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.208.193 listed in wl.mailspike.net] 1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [178.252.127.239 listed in dnsbl.sorbs.net] 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different X-Debbugs-Envelope-To: 34343 Cc: 34343@debbugs.gnu.org, =?UTF-8?B?RmVsaWNpw6FuIE7DqW1ldGg=?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) On 07.01.2020 11:19, Michael Albinus wrote: > Dmitry Gutov writes: > > Hi Dmitry, > >> I believe it's an incidental detail that file-local-name is >> implemented through file-remote-p. Maybe we could also introduce a new >> operation as well. > > I've done this, tramp-file-local-name :-) I mean a new operation in terms of file handlers. As in the OPERATION argument to tramp-file-name-handler. > But I wonder how you want to extract a file name's local part w/o > knowing how the remote part is identified. Again, we're not speaking > only about Tramp. If you have a better proposal for file-local-name > implementation I'm all ears. Just this: (defun file-local-name (file) "Return the local name component of FILE. This function removes from FILE the specification of the remote host and the method of accessing the host, leaving only the part that identifies FILE locally on the remote system. The returned file name can be used directly as argument of `process-file', `start-file-process', or `shell-command'." (let ((handler (find-file-name-handler file 'file-local-name))) (if handler (funcall handler 'file-local-name file) ;; Until all the implementations switch over, ;; not sure how long to keep the compatibility here. (or (file-remote-p file 'localname) file)))) And yes, if we were speaking only about Tramp, I wouldn't worry about keeping the operation generic. > At least for Emacs 27.1 there won't be another solution. Eli is right, > when he rejects any substantial change to the emacs-27 branch before > Emacs 27.1 is released. Fair enough. >> It's up to you, but having an alist of exceptions should be both >> maintainable and readable. Like most other file handlers do (e.g. >> epa-file-handler) which maintain mappings of operations to functions. > > I told you already that I have bad experience with such exceptions. All > of them I had to revert later, and I don't want to reopen this can of > worms. Well, if you like the following piece of code, I guess we could live with that. (setq files (mapcar (if (tramp-tramp-file-p dir) #'tramp-file-local-name #'file-local-name) files))) By the way, I have no idea what to do about having tramp-tramp-file-p called twice. > epa-file-handler is different. In epa, there exist exactly one > implementation for a given file name operation; in Tramp you have > different implementations due to the subpackages. epa doesn't need to > care about timers, filters, sentinels, threads AFAICT. epa cares about > exactly two file name operations (insert-file-contents and > write-region), Tramp is responsible for 71 file name operations. OK. >>> In general, there's no problem calling tramp-file-name-handler, because >>> the remote operations take much more time. This machinery is neglectable >>> then. Your use case is different, because you do not trigger any remote >>> operation. >> >> Would any use of file-local-name trigger a remote operation? > > No, it shouldn't. That seems to hint that it doesn't need to be implemented in terms of file-remote-p. > OTOH, the version of tramp-file-local-name in master handles also the > case that the argument is NOT a remote file name, but a local > one. Needed in my Tramp internal use cases. I will backport this to the > emacs-27 branch, that you could also profit from if you want. It does > not cause a performance penalty for remote file names; an additional > `or' shouldn't hurt. It won't affect my use, but it sounds like a good idea either way. From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 07 09:29:48 2020 Received: (at 34343) by debbugs.gnu.org; 7 Jan 2020 14:29:49 +0000 Received: from localhost ([127.0.0.1]:47578 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ioprg-00080J-Nb for submit@debbugs.gnu.org; Tue, 07 Jan 2020 09:29:48 -0500 Received: from mout.gmx.net ([212.227.15.15]:44459) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iopre-000805-HI for 34343@debbugs.gnu.org; Tue, 07 Jan 2020 09:29:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1578407379; bh=YC0mvS1p/0JqH8ZfoNmP5mCGTOK1JsPpdHYQQtSqN9w=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=QnMaWhGEHflWGBD6jIs373gAKebsQzQY3mPOBPeG1UGzYreh33QSRyit0KBRF/bPF EbE3zM0+NK/LfqO6obQ4GzbdjQSx899/XiqsFD/lNQjGz3v0RhNwvmTfdeF1AtK/35 /9pp14ZgziuEw4sGHChfcCE/Ztd8xQ3I2nbVUp4w= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from detlef.gmx.de ([212.91.238.170]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MfYLa-1jLgdf2YXY-00g2U8; Tue, 07 Jan 2020 15:29:39 +0100 From: Michael Albinus To: Dmitry Gutov Subject: Re: bug#34343: [PATCH] Make project--find-regexp-in-files work with remote files References: <87h81mqiq5.fsf@gmx.de> <0ff03b20-20d8-b6c0-c876-3fd525586180@yandex.ru> <87mubdps6s.fsf@gmx.de> <87blrsz3tf.fsf@gmx.de> <87blrrmht9.fsf@gmx.de> <87tv5fs6kf.fsf@gmx.de> <7a1e2e22-89d4-b8b9-6cd4-e6947436138c@yandex.ru> <87mub6uoa6.fsf@gmx.de> <87blrksxco.fsf@gmx.de> <81589ba9-0f93-599d-e55f-6605479454b0@yandex.ru> <87y2ukjuan.fsf@gmx.de> <10dbccdd-99e8-883b-01e6-e8d3bc1e195e@yandex.ru> <87k163fwsl.fsf@gmx.de> <7d46d704-6bcb-391c-64bb-4a443a88130d@yandex.ru> Date: Tue, 07 Jan 2020 15:29:30 +0100 In-Reply-To: <7d46d704-6bcb-391c-64bb-4a443a88130d@yandex.ru> (Dmitry Gutov's message of "Tue, 7 Jan 2020 16:40:10 +0300") Message-ID: <87zhezwd9x.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:GenOkgYvauoFzW7e+bt5CJsn604QS1EXByS2F/0esl22N9di9BO PefRxbs9TaHR8dZP3NHnrYVwKXdIsZPAaQfZUH5TTBI4LpclVUpZHGeq4ABXdaNJ4Th5BA2 DjxazL65YJNW2HxyebtwFviEVsVpyyIPaXT9ryjF3Y5X7l+a1EvG6j+GQziaWPy1+jeD5+G AsFnJIRDihVjPgKSXTlDA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:+tUU3SaAUd0=:Dzg+xBfLXvAEF9N5TT/zn/ S/kjQNiqrd6DXxRWKjBDKsMXNmFbORQGzwUGREJ6XZM2BPPIIiznFEsMhcU1HGJqecJwyg0in 1KbZ63ciRoANEGG8raLGe6Siqvv1OAdDp38o2SgCFNITHWWMuGrzGX8MDvBpllyzfvJc6NfPb Hk+JdvoqVqfIwVqRIxtq7DhGrCmUy4+RMimF1Knsp7qiwDTVc7B0Bl9u6enUow6xoJifoyZWv +AiAD8rtANSosGyLE3E9zpUrJwX6PYNY8vqnqjGCGui3S3CVfg+lEJKLCkIDqoqHSFJ77CgjP P8wdziRK2ZxKkxUuvgkQ9hFpTYXUz3uWWD1d4Q5o9g6Gdtv4lKhl23IdCjNM8Zdh3cmCEqIHd 05x8WW6pYdpGlzh73Z4ojZeV+G7TKxEOQFdjB0c1d/dU1FkgkBlBOsVDJzo4lR9sRLwqPjGWi gsitt3LrQyWfpQuSKCBNIZnhl9tj1Yk8bhs5W3t1tVccJRztCfeMG4DKjyex8DGCEjxtNbdy9 hxlkHnc4cHHFWcjs/duGTZ3Ib5L7D+pHiqPCnK7zzktn5Dg/gVWojOP6RF4VwRZmeQj7990HV GgMFLz/W2t1Z69NbpIBwSrP+S3ijOGnt4ZGQJzGNdlF2O35+Jj9O3XEYBF6Ol4HDP5quIp1ne D3qaKLoZYzkVZs6W7dKFFhPBOUKfNKhmFqcOzUFKx0HeZTuIGLPEfCMCUoxj8lcViLKR0O7Ik 0KnlLO9b1G5humJZNYVwu8WIUizVamqGG6+94fZ7W2FUoobxBiP6mPFZwC07EheYGUhiydLnp 8ggEUmIdhOKaXq0YaMFL3YrOfkxc+xfupoc79Hy4stdFz5LOrltLDNhEn5SrH46NZnpIds3cw 5o59q6UdxDQBM8dwB+j/hlLOfbvyfjk0ygqYNa+3en++HHjzQmVJTFSESG4YGEMhvUS3O7+hH xvJDbw5cJGKIOvIhnoHwjOoydcfNjJ2GuS2YeSf/V7NPl59uzx7Onus8IgluzQEyptaonoxjC 1QX2vtOIutxwlWCmA3hnynm1lBVVZQLgGZufL/qLnTG1ZhIkqaqyYfOZr73+T0+V2Qacakna8 rmym7A63cMined6+Nw/K2LOAEyaxf8IHg+6pi5It+z91bULGMyn8y/Cl1A/NVMYLtd2cA7gjc igpC01vMdXK7XEfCBNasEWTLkt3F+KlUAfF53MwLOWmFAgD62QvAN9fyLGM6XdGXqC+1yRyq9 Vtn9idRYfJ8ufiQGeVPZ58/BCZYJbNcv7wr9ho5n/SHU5nw4Rl66vr9s7910= X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 34343 Cc: 34343@debbugs.gnu.org, =?utf-8?Q?Felici=C3=A1n_N=C3=A9meth?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Dmitry Gutov writes: > (defun file-local-name (file) > "Return the local name component of FILE. > This function removes from FILE the specification of the remote host > and the method of accessing the host, leaving only the part that > identifies FILE locally on the remote system. > The returned file name can be used directly as argument of > `process-file', `start-file-process', or `shell-command'." > (let ((handler (find-file-name-handler file 'file-local-name))) > (if handler > (funcall handler 'file-local-name file) > ;; Until all the implementations switch over, > ;; not sure how long to keep the compatibility here. > (or (file-remote-p file 'localname) file)))) handler would be tramp-file-name-handler, so I don't see how it helps. > Well, if you like the following piece of code, I guess we could live > with that. > > (setq files (mapcar > (if (tramp-tramp-file-p dir) > #'tramp-file-local-name > #'file-local-name) > files))) That would work. If you are sure that you will handle only Tramp based remote files, you could simplify this to (setq files (mapcar #'tramp-file-local-name files)) > By the way, I have no idea what to do about having tramp-tramp-file-p > called twice. Take the tramp-tramp-file-p call out of mapcar, like (let ((fun (if (tramp-tramp-file-p dir) #'tramp-file-local-name #'file-local-name))) (setq files (mapcar fun files))) Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 07 09:34:49 2020 Received: (at 34343) by debbugs.gnu.org; 7 Jan 2020 14:34:49 +0000 Received: from localhost ([127.0.0.1]:47582 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iopwX-000892-AQ for submit@debbugs.gnu.org; Tue, 07 Jan 2020 09:34:49 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:34026) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iopwV-00088j-Do for 34343@debbugs.gnu.org; Tue, 07 Jan 2020 09:34:47 -0500 Received: by mail-lj1-f194.google.com with SMTP id z22so50157035ljg.1 for <34343@debbugs.gnu.org>; Tue, 07 Jan 2020 06:34:47 -0800 (PST) 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=9q2DoR3/cFqZshMInYs3cqZsi6XHxbO4UieppPDkyMA=; b=dljnswCQq9iAhEON5fZhE++NJh677dlbUA1Ek4FQqukOrdT1GqUW1PV25VpgbRZElw dMvoVZ4qUnUo63wy76QkhoFqg/lrZrVup/1zSD3MsEHobj0y8GPflq40esFgovtSFm4N WJYV2v+IHek4WHn4xfrKnfJQng45V783xGmGRq9MZB+V9JTv7llg2uhx66r7FjSvE2Mv KCh/QS3+6ICemU/jsmvPlq9HKYIb5VRJDbiduXr4ZohWDuAKwl+9Vqyz3Hj3q6HeABGM 9avJgGYX6cRyUamcUTy1b3xEcwnjtC12Ss5ep38nWjz21atDK3UJX0DkiH3QQl90bBXH C/JQ== 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=9q2DoR3/cFqZshMInYs3cqZsi6XHxbO4UieppPDkyMA=; b=CGT9D2Kk3sILJj8WmXsq4xsBveRLJ4AWc/9fGyfjQvKz9wkfrXhvkbCP2UGM6GtYzd SIYRCK/ioEiAOrLcv7hpP8YY7sLm7jdUDaRLxVkSDk2iOKPe58++U48lI2QcSzrSCWRn 8Av24ROdrUEpuEOpsiyFeyKFoycfnPeKRrFvICBIkw0E6QKHpJ/sncxOmjvj71jctmBL QRwuITGDZ2D2IQxys0IExabr15N9+q2CBUAjjyxED3Eylnr6aWvlxKPYxMrGTY4QbpV3 04KPV2LBCsupTn4yVM1l43QsW/QVh/RHZ95saOvQIvoRpTI7QnZgtLmeNeksA/pSnkQA wqdw== X-Gm-Message-State: APjAAAWeYS91eqUS+JNNgEa40vOJRZeJx1Sq9KlIXobJvcNR5bdvMuen xn2eYqlDeUxTlFCqrrIzVXgq/CPK4lI= X-Google-Smtp-Source: APXvYqy30ts1DMS9QZH2WkTtOfA1rxaLXi+QOrkchPKuD6aVxgfuehw4Qql0u95SnoaNlxbu7lwcow== X-Received: by 2002:a2e:b0db:: with SMTP id g27mr65107292ljl.74.1578407680972; Tue, 07 Jan 2020 06:34:40 -0800 (PST) Received: from [192.168.1.142] ([178.252.127.239]) by smtp.googlemail.com with ESMTPSA id e20sm30888484ljl.59.2020.01.07.06.34.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Jan 2020 06:34:39 -0800 (PST) Subject: Re: bug#34343: [PATCH] Make project--find-regexp-in-files work with remote files To: Michael Albinus References: <87h81mqiq5.fsf@gmx.de> <0ff03b20-20d8-b6c0-c876-3fd525586180@yandex.ru> <87mubdps6s.fsf@gmx.de> <87blrsz3tf.fsf@gmx.de> <87blrrmht9.fsf@gmx.de> <87tv5fs6kf.fsf@gmx.de> <7a1e2e22-89d4-b8b9-6cd4-e6947436138c@yandex.ru> <87mub6uoa6.fsf@gmx.de> <87blrksxco.fsf@gmx.de> <81589ba9-0f93-599d-e55f-6605479454b0@yandex.ru> <87y2ukjuan.fsf@gmx.de> <10dbccdd-99e8-883b-01e6-e8d3bc1e195e@yandex.ru> <87k163fwsl.fsf@gmx.de> <7d46d704-6bcb-391c-64bb-4a443a88130d@yandex.ru> <87zhezwd9x.fsf@gmx.de> From: Dmitry Gutov Message-ID: Date: Tue, 7 Jan 2020 17:34:38 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <87zhezwd9x.fsf@gmx.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On 07.01.2020 16:29, Michael Albinus wrote: > handler would be tramp-file-name-handler, so I don't see how it helps. See my previous patch. It would only need one comparison, and file-remote-p wouldn't need to be mentioned. Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (dgutov[at]yandex.ru) 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.5 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [178.252.127.239 listed in dnsbl.sorbs.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.208.194 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.208.194 listed in wl.mailspike.net] 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different X-Debbugs-Envelope-To: 34343 Cc: 34343@debbugs.gnu.org, =?UTF-8?B?RmVsaWNpw6FuIE7DqW1ldGg=?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) On 07.01.2020 16:29, Michael Albinus wrote: > handler would be tramp-file-name-handler, so I don't see how it helps. See my previous patch. It would only need one comparison, and file-remote-p wouldn't need to be mentioned. >> Well, if you like the following piece of code, I guess we could live >> with that. >> >> (setq files (mapcar >> (if (tramp-tramp-file-p dir) >> #'tramp-file-local-name >> #'file-local-name) >> files))) > > That would work. If you are sure that you will handle only Tramp based > remote files, you could simplify this to > > (setq files (mapcar #'tramp-file-local-name files)) Of course I'm not sure. Hence the conditional. >> By the way, I have no idea what to do about having tramp-tramp-file-p >> called twice. > > Take the tramp-tramp-file-p call out of mapcar, like > > (let ((fun (if (tramp-tramp-file-p dir) > #'tramp-file-local-name #'file-local-name))) > (setq files (mapcar fun files))) The above is pretty much equivalent. Anyway, please never mind. It's just one extra call to tramp-tramp-file-p. Not twice per each file. From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 22 09:00:44 2021 Received: (at 34343) by debbugs.gnu.org; 22 Jul 2021 13:00:45 +0000 Received: from localhost ([127.0.0.1]:39689 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6YJg-0006uU-B1 for submit@debbugs.gnu.org; Thu, 22 Jul 2021 09:00:44 -0400 Received: from quimby.gnus.org ([95.216.78.240]:54736) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6YJe-0006o0-Ok for 34343@debbugs.gnu.org; Thu, 22 Jul 2021 09:00:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=h/AObQqwJfQrQ9We9eXbFurmQoVcdNCgA0XKc2b+67Q=; b=QI0olv1W4BS0JX7UBJFXKuaghB XG0SCYNBPwXiGRJXLB8WP3lcgVuEzEoekf5jaljbpQJpwSpfBskiS6t9slkInxUYEUJZ3GaKh0GL/ hmdhP/kvJeBi/0CwO930G4tDt4MacDGvtCionB8Mh4i9iPs3Uvq92XvomelMGGpLJq4s=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m6YJQ-0002Yp-Rk; Thu, 22 Jul 2021 15:00:31 +0200 From: Lars Ingebrigtsen To: Dmitry Gutov Subject: Re: bug#34343: [PATCH] Make project--find-regexp-in-files work with remote files References: <87h81mqiq5.fsf@gmx.de> <0ff03b20-20d8-b6c0-c876-3fd525586180@yandex.ru> <87mubdps6s.fsf@gmx.de> <87blrsz3tf.fsf@gmx.de> <87blrrmht9.fsf@gmx.de> <87tv5fs6kf.fsf@gmx.de> <7a1e2e22-89d4-b8b9-6cd4-e6947436138c@yandex.ru> <87mub6uoa6.fsf@gmx.de> <87blrksxco.fsf@gmx.de> <81589ba9-0f93-599d-e55f-6605479454b0@yandex.ru> <87y2ukjuan.fsf@gmx.de> <10dbccdd-99e8-883b-01e6-e8d3bc1e195e@yandex.ru> <87k163fwsl.fsf@gmx.de> <7d46d704-6bcb-391c-64bb-4a443a88130d@yandex.ru> <87zhezwd9x.fsf@gmx.de> X-Now-Playing: John T. Gast's _Inna Babalon_: "Jonathan" Date: Thu, 22 Jul 2021 15:00:28 +0200 In-Reply-To: (Dmitry Gutov's message of "Tue, 7 Jan 2020 17:34:38 +0300") Message-ID: <87fsw6jyfn.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Skimming this thread, I'm not quite sure what the status here is. But there's this: commit be38e39fccab7c2f8e86c59ffb9c022d3d5b9382 Author: Dmitry Gutov AuthorDate: Thu Dec 26 15:38:53 2019 +0200 Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 34343 Cc: =?utf-8?Q?Felici=C3=A1n_N=C3=A9meth?= , 34343@debbugs.gnu.org, Michael Albinus X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Skimming this thread, I'm not quite sure what the status here is. But there's this: commit be38e39fccab7c2f8e86c59ffb9c022d3d5b9382 Author: Dmitry Gutov AuthorDate: Thu Dec 26 15:38:53 2019 +0200 project--find-regexp-in-files: Support remote files * lisp/progmodes/project.el (project--find-regexp-in-files): Support remote files (bug#34343). Does this mean that this bug report should be closed? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 22 09:00:44 2021 Received: (at control) by debbugs.gnu.org; 22 Jul 2021 13:00:44 +0000 Received: from localhost ([127.0.0.1]:39687 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6YJg-0006uF-3M for submit@debbugs.gnu.org; Thu, 22 Jul 2021 09:00:44 -0400 Received: from quimby.gnus.org ([95.216.78.240]:54732) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6YJe-0006nb-Nl for control@debbugs.gnu.org; Thu, 22 Jul 2021 09:00:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=9VeeIItpKMrL2RyF2UQGeSOUeXZyzqJFvtS+N6TgVoY=; b=mee/Bg30f8FhMIU5l2ri0ACIQN 12C2AoswHDwVreI1pxvtv9XzKBy0fkLXkepJuHSw2bVpNkzJAjF9KRqCdyfAVK0gYqwzSUKJm159p LdKcobKZ9QCE+trr79MUge88Q4ooX/bgBIgKzRK5Ea9XeeNppvxX+e6JtNeehQm7TUpQ=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m6YJW-0002Yx-Fk for control@debbugs.gnu.org; Thu, 22 Jul 2021 15:00:36 +0200 Date: Thu, 22 Jul 2021 15:00:34 +0200 Message-Id: <87eebqjyfh.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #34343 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 34343 + moreinfo quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) tags 34343 + moreinfo quit From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 24 15:42:12 2021 Received: (at 34343) by debbugs.gnu.org; 24 Jul 2021 19:42:12 +0000 Received: from localhost ([127.0.0.1]:47091 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7NXI-0004oU-Gl for submit@debbugs.gnu.org; Sat, 24 Jul 2021 15:42:12 -0400 Received: from mail-wr1-f53.google.com ([209.85.221.53]:43802) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7NXF-0004oH-GK for 34343@debbugs.gnu.org; Sat, 24 Jul 2021 15:42:11 -0400 Received: by mail-wr1-f53.google.com with SMTP id y8so6023404wrt.10 for <34343@debbugs.gnu.org>; Sat, 24 Jul 2021 12:42: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=SpXEVfSIdc7+/BuSm3mlhpkSge3HptqovQqizYMxryE=; b=oVY5b9WDetcXVTd2Hj3IrRI+9FnEfb+1zNqXfl6kAn48+g4c0Hs/AK27U5QPpUixPS wNkPas3whvanMhfolrQwY+0mL6uehdtZjF9TGi9GCEskUVqkUuW0lrzYLD7htN6Bnoem SYNY3k0o8YJAA7Nbq9JmZl+BbezLbWYJ8+2DEc17IdsIOz9bzWp/Ey7bo7uWXap2gI0U G28V56fdNOQpjss91Dq40eFpPr6uZM8A+SRw599ZWg7JZArt+d7yPzt0rNd+qanFXRXK rD7+imGcZtQaWrwLDS1VLv6qe2sz3Ho6UBk7rUNlvp8OOKAOb9LgSVolYU7TKFlvE8rC wgUA== 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=SpXEVfSIdc7+/BuSm3mlhpkSge3HptqovQqizYMxryE=; b=G1WQUSmnAbTollVJyZuCANSDMQACaInW8SBc1UeFMmLBLa4NB2J9ecr4pOCTenc8uX CdR+wt91P0nS1O+eh7bm6bY/xxfa3ERT5Ia8KgUxRPqcI9OHYIC/x8uIzj/pdAauAMjf iapm2bDWcC+FkTQwSQRMcXKYA2Nlw+tx9h1AeuTGxGHCPB9mul5uoTmWLsWbmGmJzOlt 7On48ViP1qalaQcsLHk1UPK3DMQoFsdFVMF0FSwcf3icSmRuUEj8ISwx2VwcaNqEev15 jDX0xC6vcKR3vwgKZYvnDYc0ChBH8rnqETF3JISbokZgMGu77sSvioo5Tdm+diDPaQCz AF7A== X-Gm-Message-State: AOAM532dUCgBwwHXxRXvWinPwIWxHsG+4bL0fj7tlcBGgRpKqI669LID dz3gsBeFBlIYdDvU4OvRl4k= X-Google-Smtp-Source: ABdhPJxDfLngoRXXY/ArVJae66YbxnWz62UixfA2IaYPF3HGooogpDCotihTepXyQA7NnA4yESJC2A== X-Received: by 2002:a5d:64aa:: with SMTP id m10mr11127047wrp.351.1627155723594; Sat, 24 Jul 2021 12:42:03 -0700 (PDT) Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id h15sm35690390wrq.88.2021.07.24.12.42.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 24 Jul 2021 12:42:02 -0700 (PDT) Subject: Re: bug#34343: [PATCH] Make project--find-regexp-in-files work with remote files To: Lars Ingebrigtsen References: <87h81mqiq5.fsf@gmx.de> <0ff03b20-20d8-b6c0-c876-3fd525586180@yandex.ru> <87mubdps6s.fsf@gmx.de> <87blrsz3tf.fsf@gmx.de> <87blrrmht9.fsf@gmx.de> <87tv5fs6kf.fsf@gmx.de> <7a1e2e22-89d4-b8b9-6cd4-e6947436138c@yandex.ru> <87mub6uoa6.fsf@gmx.de> <87blrksxco.fsf@gmx.de> <81589ba9-0f93-599d-e55f-6605479454b0@yandex.ru> <87y2ukjuan.fsf@gmx.de> <10dbccdd-99e8-883b-01e6-e8d3bc1e195e@yandex.ru> <87k163fwsl.fsf@gmx.de> <7d46d704-6bcb-391c-64bb-4a443a88130d@yandex.ru> <87zhezwd9x.fsf@gmx.de> <87fsw6jyfn.fsf@gnus.org> From: Dmitry Gutov Message-ID: <6e35adb5-fb7e-00fc-df40-59a3c183afab@yandex.ru> Date: Sat, 24 Jul 2021 22:42:00 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <87fsw6jyfn.fsf@gnus.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 34343 Cc: =?UTF-8?B?RmVsaWNpw6FuIE7DqW1ldGg=?= , 34343@debbugs.gnu.org, Michael Albinus X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) On 22.07.2021 16:00, Lars Ingebrigtsen wrote: > commit be38e39fccab7c2f8e86c59ffb9c022d3d5b9382 > Author: Dmitry Gutov > AuthorDate: Thu Dec 26 15:38:53 2019 +0200 > > project--find-regexp-in-files: Support remote files > > * lisp/progmodes/project.el (project--find-regexp-in-files): > Support remote files (bug#34343). > > Does this mean that this bug report should be closed? I suppose the original complaint is resolved, even if file-local-name's performance necessitated the workaround. The seems to be no progress on improving the latter, but it's out of my hands anyway, so I guess we can close this report. Thanks to all involved. From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 25 02:41:44 2021 Received: (at 34343) by debbugs.gnu.org; 25 Jul 2021 06:41:44 +0000 Received: from localhost ([127.0.0.1]:47412 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7XpY-0008Gk-14 for submit@debbugs.gnu.org; Sun, 25 Jul 2021 02:41:44 -0400 Received: from quimby.gnus.org ([95.216.78.240]:41454) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7XpW-0008GT-J8 for 34343@debbugs.gnu.org; Sun, 25 Jul 2021 02:41:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=dsrgn0pRScmeB3mSUdIz8n39ZsHczUb3DshBwNIfw9M=; b=gFvJVMHlDzUs9xd285L0N5VumJ QowMUhFCWJNjn8OtMDlWe/PonqLwbh0MuohycnOZko+2uciPvMZQvzfi8eH/sG6VDP+AM3xpazKTz f0d48i/zvwEjFlJb9EOvQ3KHUn0mKA6Pd0ymeGyehLDSw2uPCS2fPmt5ru1wQXXrTsvs=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m7XpO-0006DH-2S; Sun, 25 Jul 2021 08:41:36 +0200 From: Lars Ingebrigtsen To: Dmitry Gutov Subject: Re: bug#34343: [PATCH] Make project--find-regexp-in-files work with remote files References: <87mubdps6s.fsf@gmx.de> <87blrsz3tf.fsf@gmx.de> <87blrrmht9.fsf@gmx.de> <87tv5fs6kf.fsf@gmx.de> <7a1e2e22-89d4-b8b9-6cd4-e6947436138c@yandex.ru> <87mub6uoa6.fsf@gmx.de> <87blrksxco.fsf@gmx.de> <81589ba9-0f93-599d-e55f-6605479454b0@yandex.ru> <87y2ukjuan.fsf@gmx.de> <10dbccdd-99e8-883b-01e6-e8d3bc1e195e@yandex.ru> <87k163fwsl.fsf@gmx.de> <7d46d704-6bcb-391c-64bb-4a443a88130d@yandex.ru> <87zhezwd9x.fsf@gmx.de> <87fsw6jyfn.fsf@gnus.org> <6e35adb5-fb7e-00fc-df40-59a3c183afab@yandex.ru> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAD1BMVEWpYhtZLB7pohnu 0aH///80edrZAAAAAWJLR0QEj2jZUQAAAAd0SU1FB+UHGQYaHcLKDiQAAAGVSURBVDjLVVOBkcMw CAN+AfwT8M4Gzf67vQQ2tX29pkWRABlE6ujAEZk8eIjKqCNis04gHgB4EJ+z4/mtQAMydsT5OxmU tx3GD+MT2jEaqDwqBhExda3csfIjCBUK4eOdhMDAu6hI9awKefl/rD4kmmIqTu0CXL6cBEYSL6mp JkvKbwAyXl6xhiu5/CagN8PwWjKUzZwmoiCfDkDY4bwQj18qjsPdQozeKqo642Vmmu4ScgEBH7Jc i5uCu0hLPC/nRhLA9ZJ/SMEvISEmtNTim4N+7ZLwTisRkMzEptL5FC2AHg7ebwGBEIZhVlnrezti 4cHb0hW3LlUScBrs3tOb9iaD+kOOsY5hkSKunFXfhiHYgJ/e0/fY+1GWNdIAOZ0jb36Pj+49Y+u5 IQkIut8eRt1O7pmWI6tBkJ7P3DnYUiE27ZkHIH/LEyi9JNJbmMKWZHb6txiSyyY7O4Sedw31SIZJ ZSclh4EgWvUCsKbTXuEgYnH9u+3ZxlszSrT3CsCDHD+i69ZHlcu7TUaNg/aCcint+fwD5Chalzzb s+IAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjEtMDctMjVUMDY6MjY6MjkrMDA6MDDdxZBdAAAAJXRF WHRkYXRlOm1vZGlmeQAyMDIxLTA3LTI1VDA2OjI2OjI5KzAwOjAwrJgo4QAAAABJRU5ErkJggg== X-Now-Playing: Prince's _Sign 'O' the Times (2)_: "It's Gonna Be A Beautiful Night" Date: Sun, 25 Jul 2021 08:41:33 +0200 In-Reply-To: <6e35adb5-fb7e-00fc-df40-59a3c183afab@yandex.ru> (Dmitry Gutov's message of "Sat, 24 Jul 2021 22:42:00 +0300") Message-ID: <878s1uzyhu.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Dmitry Gutov writes: > The seems to be no progress on improving the latter, but it's out of > my hands anyway, so I guess we can close this report. Thanks to all > involved. OK; closing. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 34343 Cc: =?utf-8?Q?Felici=C3=A1n_N=C3=A9meth?= , 34343@debbugs.gnu.org, Michael Albinus X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Dmitry Gutov writes: > The seems to be no progress on improving the latter, but it's out of > my hands anyway, so I guess we can close this report. Thanks to all > involved. OK; closing. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 25 02:41:53 2021 Received: (at control) by debbugs.gnu.org; 25 Jul 2021 06:41:53 +0000 Received: from localhost ([127.0.0.1]:47415 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7Xph-0008H6-8R for submit@debbugs.gnu.org; Sun, 25 Jul 2021 02:41:53 -0400 Received: from quimby.gnus.org ([95.216.78.240]:41470) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7Xpf-0008Gs-3B for control@debbugs.gnu.org; Sun, 25 Jul 2021 02:41:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Vzk517cXoLFBW4qsexoH7ydAKV2btlj/Dkz3vYRX8rY=; b=Pzepy0Xm/juBICJFvwkqmazhdW miSYexSD+inJhsRtgy64PzOUe+mTdsdqxGwfXgjk0yjXqqZDLIXCnwnpWx4VxFae8TS8nGeLkM/+N ZMFrht6ZTtHccfyyaKLnAmxotRsDtQyosdeoZRQS0LXcib9ZO702vAIPxB0vl7Qwl7jM=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m7XpX-0006DY-Ei for control@debbugs.gnu.org; Sun, 25 Jul 2021 08:41:45 +0200 Date: Sun, 25 Jul 2021 08:41:43 +0200 Message-Id: <877dhezyhk.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #34343 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 34343 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 34343 quit From unknown Sat Jun 21 03:27:18 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 22 Aug 2021 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator