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

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Felicián Németh
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án


0001-Make-project-find-regexp-in-files-work-with-remote-f.patch (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

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

Dmitry Gutov
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.



Reply | Threaded
Open this post in threaded view
|

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

Felicián Németh
On Thu, Feb 14, 2019 at 2:17 AM Dmitry Gutov <[hidden email]> 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.

0001-Make-project-find-regexp-in-files-work-with-remote-f.patch (2K) Download Attachment