Subject: Re: bug#71179: [PATCH] In rgrep, check matching files before excluding files

From: Spencer Baugh <[email-masked]>
Date: Sat, 25 May 2024 09:36:44 -0400

Eli Zaretskii <[email-masked]> writes:
> The ones for whom the proposed change will affect the results.

To be clear, the proposed change will not affect the content of the
results returned by rgrep or any code in grep.el.  For them, this change
has no semantic effect at all, it only speeds things up.

The only user-observable difference besides the speedup is that it fixes
a bug: grep-find-ignored-files is documented to affect rgrep, and now
that variable affects rgrep even if grep-find-template is set to a
broken value (one which doesn't include <X>).

It's unlikely anyone is relying on this buggy behavior when <X> isn't
present; the much more obvious way and documented way to achieve this
behavior is to set grep-find-ignored-files to nil (which still works
fine).

I suppose we could preserve that bug by conditioning this optimization
on (string-search "<X>" grep-find-template), though.