From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#71179: [PATCH] In rgrep, check matching files before excluding files Date: Sat, 25 May 2024 16:56:31 +0300 Message-ID: <861q5qyoz4.fsf@gnu.org> References: <86jzji1jpe.fsf@gnu.org> <864jamyrzy.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16914"; mail-complaints-to="usenet@ciao.gmane.io" Cc: dmitry@gutov.dev, 71179@debbugs.gnu.org To: Spencer Baugh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 25 15:58:16 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sAruZ-0004BK-7v for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 25 May 2024 15:58:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sAruF-0005Gi-IE; Sat, 25 May 2024 09:57:55 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sAruE-0005GP-Dl for bug-gnu-emacs@gnu.org; Sat, 25 May 2024 09:57:54 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sAruE-0000Ez-5D for bug-gnu-emacs@gnu.org; Sat, 25 May 2024 09:57:54 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sAruL-000859-Lh for bug-gnu-emacs@gnu.org; Sat, 25 May 2024 09:58:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 May 2024 13:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71179 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 71179-submit@debbugs.gnu.org id=B71179.171664543730943 (code B ref 71179); Sat, 25 May 2024 13:58:01 +0000 Original-Received: (at 71179) by debbugs.gnu.org; 25 May 2024 13:57:17 +0000 Original-Received: from localhost ([127.0.0.1]:43560 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sArtd-000830-0m for submit@debbugs.gnu.org; Sat, 25 May 2024 09:57:17 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:33370) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sArtb-00082c-8I for 71179@debbugs.gnu.org; Sat, 25 May 2024 09:57:15 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sArtO-0008R7-0j; Sat, 25 May 2024 09:57:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=I2Hq1ayIpPLAzaQdAn7jo9uCUqXfWxfCNlhtVEMAECM=; b=JhDI7MR6USEQ saJDk8siUTKqninjlVPq73K8k2E0YxO8G37JVDmZITY672M/j8/2bNKNvo8EWbPKHi6NjBq5DUIWN v7zqom44Y0CFknR5Y74B8vpYT+qbDNfaj15rRJB+TwB5rO6bgD/IC3oyBVgHmYt5Fv+bFF7cgFdWF 1E0I1RTtEgB0Ez4jvR/Y6e6Ojv7WNB5vPkgeNRPUkJSiNJdh6G34UehBQ6Z0z3NHK/BORXkJZw6sM Zw9to8NtRTVsZcXtEWjcVPtAv5vhQd/hGW9wQwFrUcYiwZFME68R09A2ACmJ7jiInb5f4kyeeYpPQ TRepOdoCXCYljz3Dd5MKjQ==; In-Reply-To: (message from Spencer Baugh on Sat, 25 May 2024 09:36:44 -0400) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:285874 Archived-At: > From: Spencer Baugh > Cc: Dmitry Gutov , 71179@debbugs.gnu.org > Date: Sat, 25 May 2024 09:36:44 -0400 > > Eli Zaretskii 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 ). You call that "broken", but I disagree. There's nothing wrong with removing from the template. > I suppose we could preserve that bug by conditioning this optimization > on (string-search "" 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).