[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question about dired-do-find-regexp and xref-collect-matches

From: Eric Abrahamsen
Subject: Re: Question about dired-do-find-regexp and xref-collect-matches
Date: Tue, 30 Jul 2019 10:22:28 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Dmitry Gutov <address@hidden> writes:

> Hi Eric,
> On 10.07.2019 2:18, Eric Abrahamsen wrote:
>> A while ago I switched to the fish shell, which I generally like better
>> than bash.
> I also like fish, a lot. I don't use it inside Emacs, though.

Yeah, I just set Emacs' shell to bash, seems safer.

>> While poking around I also noticed that dired-do-find-regexp calls
>> xref-collect-matches once per marked file. That means a full find+grep
>> call for each file, when a single find+grep call (or even just a single
>> grep call!) would do the trick.
> That sounds like a bug report material. Up until now I figured a few
> extra shell process calls wouldn't matter, but maybe they can.
> Just how many files are you marking in the given example?

This was somewhere between 250-300 XML files.

>> The search hits are collected as:
>> (mapcan
>>   (lambda (file)
>>     (xref-collect-matches regexp "*" file
>>                           (and (file-directory-p file)
>>                                ignores)))
>>   files)
>> But the second argument to `xref-collect-matches' can be a
>> space-separated string of file names -- wouldn't it be easier just to
>> call `xref-collect-matches' once?
> Not exactly. That FILES argument is something different (a list of globs).
> Overall, this shouldn't be too hard to fix. Could you send your
> response to the bug tracker as a new report?

Done, as bug#36857. Thanks for looking at this.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]