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#75379: 30.0.93; project-find-regexp expects "C" or "en" locale Date: Mon, 6 Jan 2025 22:33:21 +0200 Message-ID: References: <86jzb96qul.fsf@gnu.org> <871pxg3xu5.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="28797"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: 75379@debbugs.gnu.org, Eli Zaretskii , Matthias Meulien To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jan 06 21:34:19 2025 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 1tUtnm-0007Ht-VU for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 06 Jan 2025 21:34:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tUtng-0006Um-R1; Mon, 06 Jan 2025 15:34:14 -0500 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 1tUtnX-0006Sz-MJ for bug-gnu-emacs@gnu.org; Mon, 06 Jan 2025 15:34:04 -0500 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 1tUtnW-0006bX-M6 for bug-gnu-emacs@gnu.org; Mon, 06 Jan 2025 15:34:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=In-Reply-To:From:References:MIME-Version:Date:To:Subject; bh=A3tfZcuuvqFMDzVAG+VDl9QsWSn6mvnlRWCvL1aEg40=; b=dVVUwvFBRyBtkMLTJF3ne1fXl7bfdvU8t9IMWgwpw6CXH/Aiem6V12B9Sjd7KdK8dwu3NdFYSKMSOD7Ln3xaYCWxHXwAVdKgCcBO4g+tCv3sILTOrnSGxiJc1V5b10td2PoN2tYKA1MZAqLSqRkapo4CmmiXRMMet1l/y71mmAJ3Z07UyN936ii6u5Eq6A6RDlmssUFFz3nONG670rCNyzL8aWOi4afyxeCGEEsGUpBR5b3UO2mZYxkHyrLvsLM/zpPZ74r7s8JGZnJxXYQJS56jCYREAF1maDPUUUgF/coOPN/XNGHuVCcD99+9/GIz/V4oiawvhj7HLd5lBZ1AVw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tUtnW-0001SP-EO for bug-gnu-emacs@gnu.org; Mon, 06 Jan 2025 15:34:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 06 Jan 2025 20:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75379 X-GNU-PR-Package: emacs Original-Received: via spool by 75379-submit@debbugs.gnu.org id=B75379.17361956145553 (code B ref 75379); Mon, 06 Jan 2025 20:34:02 +0000 Original-Received: (at 75379) by debbugs.gnu.org; 6 Jan 2025 20:33:34 +0000 Original-Received: from localhost ([127.0.0.1]:40332 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tUtn3-0001RT-Lf for submit@debbugs.gnu.org; Mon, 06 Jan 2025 15:33:34 -0500 Original-Received: from fout-a3-smtp.messagingengine.com ([103.168.172.146]:38959) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tUtn1-0001RA-P3 for 75379@debbugs.gnu.org; Mon, 06 Jan 2025 15:33:32 -0500 Original-Received: from phl-compute-09.internal (phl-compute-09.phl.internal [10.202.2.49]) by mailfout.phl.internal (Postfix) with ESMTP id 35A36138093F; Mon, 6 Jan 2025 15:33:26 -0500 (EST) Original-Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-09.internal (MEProxy); Mon, 06 Jan 2025 15:33:26 -0500 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=fm1; t=1736195606; x=1736282006; bh=A3tfZcuuvqFMDzVAG+VDl9QsWSn6mvnlRWCvL1aEg40=; b= MW1zvej3blubRX6vnI89V3X5SgZqzBDQsEaSgjf1q1g6ruaHzma+ABIjh93YiRcI lzK2wqTgHepNUeaNVeF9zqqCq73Z7vuyUjl98y7B9RER7zDE9mf+O3q0lCKX4EAn J51SqoupuboBqi84Z0PmceKI13gJTkUW5uHdDCjawr+6SOWBhz/fHv/UkxLNYFzR /uVTNrzogrhrK9/2jOgqCsvhJ1Gt0PMHuJCZ2P2+jt+/bLUIt83ZJaPIHvlwi96i tTQv/YI/Xt+WLUJIu9iz9j/fqEA6VvxraAMQNGKFR3a/3yAAjxn9peQjv+bS40Sg mPzqGmWBmtgPJCl/S0UtOA== 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-sender:x-me-sender:x-sasl-enc; s=fm2; t=1736195606; x= 1736282006; bh=A3tfZcuuvqFMDzVAG+VDl9QsWSn6mvnlRWCvL1aEg40=; b=h 3uhqY8DSitqJpVXvGe6k6G9+/W2TEMr+nYOb9Z7mRp9MRZe9myWQnxaDgHVTvKFI 5basHjfqv4rWATDu9DJDo47qp5gnaY7CjqlNi/WaSG2fn9P88BiCQQTLnoRLsiig apqHaxscWqp8BoeaIn/dk5gqpzslTqzCSLGNDF85LRb5DUrYQqyjlm1TDU+qk+yd UHpEGk0ofN9UtF0Ss/u96+jUbxxCIN+FopfgW3qLSL760LHaa0iyqQHJkJFLSNP7 TOayGZgDLH36NfeCdvVCvu+rX7x/FYdVWYYttWnUn/qmwKexSnRt4uu4vl18HWX7 9ggIDfOFbKnzLAcDNiT6w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrudegtddgudefkecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttddv jeenucfhrhhomhepffhmihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrd guvghvqeenucggtffrrghtthgvrhhnpeetudeljeegheetgfehgeejkeeuhedvveeikeeu fedtvddtveefhfdvveegudejheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmh epmhgrihhlfhhrohhmpegumhhithhrhiesghhuthhovhdruggvvhdpnhgspghrtghpthht ohepgedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepjhhurhhisehlihhnkhhovh drnhgvthdprhgtphhtthhopehorhhonhhtvggvsehgmhgrihhlrdgtohhmpdhrtghpthht ohepvghlihiisehgnhhurdhorhhgpdhrtghpthhtohepjeehfeejleesuggvsggsuhhgsh drghhnuhdrohhrgh X-ME-Proxy: Feedback-ID: i07de48aa:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 6 Jan 2025 15:33:23 -0500 (EST) Content-Language: en-US In-Reply-To: <871pxg3xu5.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:298700 Archived-At: On 06/01/2025 19:36, Juri Linkov wrote: > Indeed, "Binary file matches" is a very important message that > helps not to miss any matches in a text file that happens > to accidentally contain a NUL byte. This saved me many times > while using rgrep. 'project-find-regexp' could do the same, > and show the same messages in the*xref* output buffer. > > So to not mess with translations, a simpler solution would be > just to copy all unhandled messages from grep/ripgrep output > to the xref buffer as is. Good point, maybe we could show different messages this way. But I think what I was trying to do there is distinguish between Grep succeeding and ending up with an error (which we should report with user-error), and the process exit status wasn't enough for that. Indeed, here's a command to try: git ls-files -z | xargs -0 grep gtags In the Emacs repository (among others) it exits with the status 123, apparently one or more of the Grep sub-invocations ended up with non-zero status (likely 1, indicating "no matches"). Even though the combined search finds a bunch of results, that doesn't change xargs's exit status. And we can't special-case the status 123 because "if any invocation of the command exited with status 1-125" covers both Grep calls that found nothing and Grep calls which were done with unrecognized flags (Grep exit status 2, IIUC). Also, when we know the format of come messages we can parse the file name out of them and create a button in the output buffer. Simply copying any unhandled messages removes that possibility.