GNU bug report logs - #75379
30.0.93; project-find-regexp expects "C" or "en" locale

Previous Next

Package: emacs;

Reported by: Matthias Meulien <orontee <at> gmail.com>

Date: Sun, 5 Jan 2025 10:36:01 UTC

Severity: normal

Found in version 30.0.93

Full log


View this message in rfc822 format

From: Dmitry Gutov <dmitry <at> gutov.dev>
To: Juri Linkov <juri <at> linkov.net>
Cc: 75379 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>, Matthias Meulien <orontee <at> gmail.com>
Subject: bug#75379: 30.0.93; project-find-regexp expects "C" or "en" locale
Date: Mon, 6 Jan 2025 22:33:21 +0200
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.




This bug report was last modified 160 days ago.

Previous Next


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