From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#47799: 28.0.50; Default `project-files' implementation doesn't work with quoted filenames Date: Mon, 19 Apr 2021 23:48:51 +0300 Message-ID: <91dd2467-f64e-eede-8098-14fc8ccd7ae7@yandex.ru> References: <658a3e61-9511-5502-43de-8f591cec7387@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37484"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 Cc: 47799@debbugs.gnu.org To: Philipp Stephani Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Apr 19 23:21:59 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lYbLC-0009dl-KV for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 19 Apr 2021 23:21:58 +0200 Original-Received: from localhost ([::1]:48572 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lYbLB-0006FI-Oq for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 19 Apr 2021 17:21:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39872) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lYaqI-0004LQ-CW for bug-gnu-emacs@gnu.org; Mon, 19 Apr 2021 16:50:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40679) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lYaqI-0005WI-3L for bug-gnu-emacs@gnu.org; Mon, 19 Apr 2021 16:50:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lYaqH-0005In-WD for bug-gnu-emacs@gnu.org; Mon, 19 Apr 2021 16:50:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Apr 2021 20:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47799 X-GNU-PR-Package: emacs Original-Received: via spool by 47799-submit@debbugs.gnu.org id=B47799.161886534220305 (code B ref 47799); Mon, 19 Apr 2021 20:50:01 +0000 Original-Received: (at 47799) by debbugs.gnu.org; 19 Apr 2021 20:49:02 +0000 Original-Received: from localhost ([127.0.0.1]:52224 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lYapK-0005HM-0t for submit@debbugs.gnu.org; Mon, 19 Apr 2021 16:49:02 -0400 Original-Received: from mail-wr1-f53.google.com ([209.85.221.53]:33576) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lYapH-0005Gu-8Z for 47799@debbugs.gnu.org; Mon, 19 Apr 2021 16:49:00 -0400 Original-Received: by mail-wr1-f53.google.com with SMTP id g9so19370675wrx.0 for <47799@debbugs.gnu.org>; Mon, 19 Apr 2021 13:48:59 -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=VR3x5kLk0tc+3uoKDtJKLD8yyA+QxUdJHcFENBkJAv8=; b=fb4GK31kId2M8yUpjiip7oxwQo0yItCnDXbZ4/IkmFlTQlG+qWQEQFQVJr0Nb0I6ij DRxqeHVJwanUzHMywZoFYXB1tn8UssraRyeJiJUzacZ8+APOv+cg7Gu/E66pcFNXQI/P YkSAmRunSICjVsnyUCH46u04xhku0d+/ASDeXQOktUHAhuqAM8tbSVSJ9IMXlyQfINes UCHwbiQ6oLZ4DcpCBR4dPMt6siYCA0LY+BwrCPAJltBGrYdMpZ/6qbhYWXHI9OyhohxK DA4RJVyaObIXNfCAOmbgjPtUj2UVo0B3UIkLzMdPR8y7ehrQpBc/KexmUfpWn2LZGhxn 48Tw== 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=VR3x5kLk0tc+3uoKDtJKLD8yyA+QxUdJHcFENBkJAv8=; b=s9AgJvp5qWVEWZdtGN828qM5s1Hg8P1yvnWpV5MhC23463QEjF7AoVi8DDAp1y0RTg 63Rug5DLfRfA27u11zcAS3UzDY5dqO7bcQdLnaO3czBmM8Q4gflKEHkzLWOfwKvCTETb Xs/6C7Xu+dcOf7kVEFnIJ0EZvt/msMXrOcYtrpVQdVLpTT3ZiDL8k/Sj9MKaeNjvga9s a1Jwo1jtBSkFlyQiFl79NDfVdu1waSilqk7o7sFakTMHYqSIuVgWj59zpPI5IWDt5AtH mPhQCXyehqX+4nTYOSYUUCrhGWQIy63LnTIOq+PTcV0+CMBIkdVaVgzhSnDc2Q1fUkKd Pa6A== X-Gm-Message-State: AOAM533znSLjZkGbCKHBHAMDIbUqBArl43snwdG+n+vbQvfgRFELibtj ATlNhK/jbZJ/HKU5N8r8qNPeQIz8rp0= X-Google-Smtp-Source: ABdhPJwzYFvqot5fW1TM5O5Ywdgt335Yyff1J7h65eD3WA7i+rzTjeaZGmOFUBFA1yJlhUEOoRVPIw== X-Received: by 2002:a5d:4948:: with SMTP id r8mr16399283wrs.35.1618865333329; Mon, 19 Apr 2021 13:48:53 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id f23sm818116wmf.37.2021.04.19.13.48.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 19 Apr 2021 13:48:52 -0700 (PDT) In-Reply-To: Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:204512 Archived-At: On 19.04.2021 17:48, Philipp Stephani wrote: >> It's a realistic use case, and the impact is significant (e.g. 1s to >> list files, 2s to unquote them all), so please look into this soon. The >> fix in xref should be simple enough, I'd just like for someone to >> realistically test it before installing (I can send a patch, if you want). > > Hah, I wasn't aware that quoting/unquoting is so slow. It's file listing that is fast, rather. ;-) The project in question has 200'000 files. > Rather than making assumptions in xref-matches-in-files, maybe we > could work more with relative filenames. For example: > 1. Add another project method "project-relative-files" that returns > filenames relative to the root. By default, this would call > project-files and make the filenames relative, but project > implementations can provide an optimized implementation. > 2. Give xref-matches-in-files an optional root directory argument and > allow users to pass names relative to that root. > Then I think both project and xref could leave these relative > filenames alone. WDYT? We've discussed this before, but it's a change in the API, a +1 method for a very minor feature. And how will we explain anyway that xref-matches-in-files, when called without the new ROOT argument, doesn't handle remote or quoted file names? So if you can fix this to avoid performance loss in the general case, that would be a good improvement for now.