From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#71179: [PATCH] In rgrep, check matching files before excluding files Date: Sun, 26 May 2024 15:56:13 +0300 Message-ID: <6921d9a4-af56-4457-9799-ee1fee8224a5@gutov.dev> References: <2c88f75b-6407-4eab-a5a5-0c16f005cd9f@gutov.dev> <2c4c0319-b16e-4912-9991-3f6ad5a035a0@gutov.dev> <86r0dpdpir.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25884"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: Spencer Baugh , 71179@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun May 26 14:57:14 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 1sBDR3-0006SW-5s for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 26 May 2024 14:57:14 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sBDQs-0006YP-PI; Sun, 26 May 2024 08:57:03 -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 1sBDQm-0006Vj-Ap for bug-gnu-emacs@gnu.org; Sun, 26 May 2024 08:56:57 -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 1sBDQk-0007W6-T7 for bug-gnu-emacs@gnu.org; Sun, 26 May 2024 08:56:55 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sBDQs-0001Az-DS for bug-gnu-emacs@gnu.org; Sun, 26 May 2024 08:57:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 26 May 2024 12:57:02 +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.17167281954488 (code B ref 71179); Sun, 26 May 2024 12:57:02 +0000 Original-Received: (at 71179) by debbugs.gnu.org; 26 May 2024 12:56:35 +0000 Original-Received: from localhost ([127.0.0.1]:38576 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sBDQQ-0001AJ-V2 for submit@debbugs.gnu.org; Sun, 26 May 2024 08:56:35 -0400 Original-Received: from wfhigh2-smtp.messagingengine.com ([64.147.123.153]:33383) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sBDQN-0001A1-Ez for 71179@debbugs.gnu.org; Sun, 26 May 2024 08:56:33 -0400 Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfhigh.west.internal (Postfix) with ESMTP id 18F1318000C3; Sun, 26 May 2024 08:56:17 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sun, 26 May 2024 08:56:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1716728176; x=1716814576; bh=cDW9xDQaejwT/Jmg2LIF2fUxnKfjSuGb1e14bPBFC+Y=; b= I4VciAhXf++08gv5+9BwL9Pfc1MF45/H9aDBUBT7JcNXPaMpKZnm1ghsMICiRZo4 +SF5FHC/DXOOlhSjYJTRBEuaO/2BE/MJYiHka6OD2xxFyUP7P+XJOtbHWAa+bkvk FDkTK0o8rgcDtM6vew7nctDfIKFUBHiMjIhItObcs3ml/nS22vdGGZwJsRe5Haa5 T8oEttFKao+OqkhxQQwB7jDTZG7RbWnCu2HwiYQHZUptGQ+lSy5ULuRwccbVGGfo Bj7cK9e+t3rGGExGuN+WUQbscKgVQIMnX6ULz8wDiwW5sLQpK+GFHOOf+yOfeGeo ntaPN81z8Q46Yt99DTrA7w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1716728176; x= 1716814576; bh=cDW9xDQaejwT/Jmg2LIF2fUxnKfjSuGb1e14bPBFC+Y=; b=N 8pSYPqpldM4XU81J+vwNYHCa5PY1P9Gz/ycNjkR4PywH1loeyNcAyL9f0KfIpgxQ uIJteVlGmYPSMGxkR8bbAKsS66m3RRXyUEz5PK+OioqYvo3P8jHG87psUCEz5IYP 7kJ1JScmiWv3P2lNvhe9BKIX/maBrlBu3GnKM5zxtamc0MmaZHs68f2J7l/f7ZSn OkzejJUamkQqE+cFrw3rTWJvSn0rL5RxN7L3yYJXP6LLTfpSTI/JINgMa8NkHzIO 6d4/LQE24Epsv5DABVCnByJInjQDKfkqKIz1KuTtnCfOxD6dL5UVu4sGDT/tbj/o ybC5/VwNFVcqJJAoeXKfA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdejvddgheekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepteduleejgeehtefgheegjeekueehvdevieekueeftddvtdevfefhvdevgedu jeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 26 May 2024 08:56:15 -0400 (EDT) Content-Language: en-US In-Reply-To: <86r0dpdpir.fsf@mail.linkov.net> 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:285961 Archived-At: On 26/05/2024 09:50, Juri Linkov wrote: >>> A grep-find-template that doesn't include will indeed start seeing >>> ignores based on grep-find-ignored-files in rgrep. But, such a user can >>> just set grep-find-ignored-files to nil and then they'll stop seeing >>> ignores again. >> Yeah, that sounds like a good enough solution for such cases. >> >> I recall that Juri experimented with customizing grep-find-template (to use >> ripgrep? and perhaps other things). I wonder what he thinks about this >> patch. > I'm using such configuration for ripgrep that hopefully should continue working: > > (setq grep-find-template "find -type f -print0 | sort -z | xargs -0 -e rg -nH --no-heading --null -j8 --sort path -M 200 --max-columns-preview -e ") AFAICT it will continue to work fine. I think you can drop the 'sort -z' step, though: the sorting at the end of xref-matches-in-files covers the results' order, and adding a synchronizing step like this slows down the overall process a little (see bug#71094).