Subject: bug#34343: [PATCH] Make project--find-regexp-in-files work with remote files

From: Dmitry Gutov <[email-masked]>
Date: Thu, 14 Feb 2019 04:17:24 +0300

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.