GNU bug report logs - #71179
[PATCH] In rgrep, check matching files before excluding files

Previous Next

Package: emacs;

Reported by: Spencer Baugh <sbaugh <at> janestreet.com>

Date: Fri, 24 May 2024 20:15:02 UTC

Severity: normal

Tags: patch

Fixed in version 30.1

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #35 received at 71179 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Spencer Baugh <sbaugh <at> janestreet.com>
Cc: dmitry <at> gutov.dev, 71179 <at> debbugs.gnu.org
Subject: Re: bug#71179: [PATCH] In rgrep, check matching files before
 excluding files
Date: Sat, 25 May 2024 16:56:31 +0300
> From: Spencer Baugh <sbaugh <at> janestreet.com>
> Cc: Dmitry Gutov <dmitry <at> gutov.dev>,  71179 <at> debbugs.gnu.org
> Date: Sat, 25 May 2024 09:36:44 -0400
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> > The ones for whom the proposed change will affect the results.
> 
> 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>).

You call that "broken", but I disagree.  There's nothing wrong with
removing <X> from the template.

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

Not good enough, sorry.  I'm quite sure other situations will emerge
where this change affects the results.  For example, you never
considered the cases where the files which match the pattern to search
also match the ignored-extensions, and many other possibilities.  IOW,
this proposal is based on a very narrow and very specific usage
pattern, whereas the real-life usage patterns are infinitely more
numerous.

My suggestion is to provide a user option to get back the old behavior
(and document all this in NEWS).




This bug report was last modified 1 year and 40 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.