GNU bug report logs - #47799
28.0.50; Default `project-files' implementation doesn't work with quoted filenames

Previous Next

Package: emacs;

Reported by: Philipp Stephani <p.stephani2 <at> gmail.com>

Date: Thu, 15 Apr 2021 13:45:02 UTC

Severity: normal

Found in version 28.0.50

Full log


View this message in rfc822 format

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Philipp Stephani <p.stephani2 <at> gmail.com>
Cc: 47799 <at> debbugs.gnu.org
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
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.




This bug report was last modified 3 years and 269 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.