GNU bug report logs - #44210
28.0.50; project.el failed to work after customizing find-program to fd

Previous Next

Package: emacs;

Reported by: Zhiwei Chen <condy0919 <at> gmail.com>

Date: Sun, 25 Oct 2020 11:27:01 UTC

Severity: normal

Found in version 28.0.50

Full log


Message #8 received at 44210 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Zhiwei Chen <condy0919 <at> gmail.com>, 44210 <at> debbugs.gnu.org
Subject: Re: bug#44210: 28.0.50; project.el failed to work after customizing
 find-program to fd
Date: Tue, 27 Oct 2020 00:37:10 +0200
Hi!

On 25.10.2020 13:26, Zhiwei Chen wrote:
> The arguments of `find-program' in function
> `project--files-in-directory' is hard coded, which disallows customizing
> `find-program' in some means.

The arguments are not hardcoded (they are constructed dynamically), but 
the format is (one expected by 'find').

'fd' uses a different arguments format, both for the "globs to search 
for" and the list of ignores. I wish we had a better mechanism in 
grep.el for a more flexible user ability to choose the tool to list 
files in a dir (and a search tool, and so on).

> `counsel-file-jump` uses `find-program' and provides
> `counsel-file-jump-args' which I thought is better.

A variable with a flat list of args won't do here, because we actually 
have to turn two other lists (FILES and IGNORES) into appropriate arguments.

What you could do, is do full :override advice on which would construct 
a proper command line for 'fd' based on these args, then call it and 
pipe through 'project--remote-file-names' (like 
'project--files-in-directory' currently does). Then benchmark them and 
post the results here.

If the result offers a meaningfully better performance, while honoring 
all ignores, we'll see what we can do to accommodate 'fd'.




This bug report was last modified 4 years and 152 days ago.

Previous Next


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