all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: emacs-devel@gnu.org
Subject: Re: Question about dired-do-find-regexp and xref-collect-matches
Date: Tue, 30 Jul 2019 10:22:28 -0700	[thread overview]
Message-ID: <87v9vjv3mz.fsf@ericabrahamsen.net> (raw)
In-Reply-To: 0cf896c0-011a-ad4c-e661-b7763c7943c8@yandex.ru

Dmitry Gutov <dgutov@yandex.ru> 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	other threads:[~2019-07-30 17:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-09 23:18 Question about dired-do-find-regexp and xref-collect-matches Eric Abrahamsen
2019-07-09 23:33 ` Drew Adams
2019-07-10  0:30   ` Eric Abrahamsen
2019-07-30 14:50 ` Dmitry Gutov
2019-07-30 17:22   ` Eric Abrahamsen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87v9vjv3mz.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.