From: Dmitry Gutov <dmitry@gutov.dev>
To: Juri Linkov <juri@linkov.net>
Cc: 75379@debbugs.gnu.org, Eli Zaretskii <eliz@gnu.org>,
Matthias Meulien <orontee@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 [thread overview]
Message-ID: <c1079473-cfce-41a9-a2ee-7b58eee55d1e@gutov.dev> (raw)
In-Reply-To: <871pxg3xu5.fsf@mail.linkov.net>
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.
next prev parent reply other threads:[~2025-01-06 20:33 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-05 10:35 bug#75379: 30.0.93; project-find-regexp expects "C" or "en" locale Matthias Meulien
2025-01-05 18:03 ` Dmitry Gutov
2025-01-05 18:46 ` Eli Zaretskii
2025-01-05 19:35 ` Dmitry Gutov
2025-01-05 20:16 ` Eli Zaretskii
2025-01-07 14:17 ` Dmitry Gutov
2025-01-07 14:23 ` Eli Zaretskii
2025-01-07 14:26 ` Dmitry Gutov
2025-01-07 14:50 ` Eli Zaretskii
2025-01-05 21:22 ` Matthias Meulien
2025-01-05 21:29 ` Matthias Meulien
2025-01-06 13:03 ` Eli Zaretskii
2025-01-06 1:55 ` Dmitry Gutov
2025-01-06 12:36 ` Matthias Meulien
2025-01-06 12:42 ` Matthias Meulien
2025-01-06 14:13 ` Dmitry Gutov
2025-01-06 14:11 ` Dmitry Gutov
2025-01-07 5:42 ` Matthias Meulien
2025-01-07 12:45 ` Eli Zaretskii
2025-01-07 14:24 ` Dmitry Gutov
2025-01-06 17:36 ` Juri Linkov
2025-01-06 20:33 ` Dmitry Gutov [this message]
2025-01-07 17:39 ` Juri Linkov
2025-01-07 19:38 ` Dmitry Gutov
2025-01-08 7:48 ` Juri Linkov
2025-01-06 13:02 ` Eli Zaretskii
2025-01-06 14:13 ` Dmitry Gutov
2025-01-05 21:10 ` Matthias Meulien
2025-01-06 1:32 ` Dmitry Gutov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c1079473-cfce-41a9-a2ee-7b58eee55d1e@gutov.dev \
--to=dmitry@gutov.dev \
--cc=75379@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=juri@linkov.net \
--cc=orontee@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.