From: Dmitry Gutov <dgutov@yandex.ru>
To: 54177@debbugs.gnu.org
Subject: bug#54177: 28.0.91; project-find-regexp misbehaves with ripgrep over tramp/sudo
Date: Sun, 27 Feb 2022 04:45:14 +0200 [thread overview]
Message-ID: <09caba9f-d927-352c-3a34-a28a414a0236@yandex.ru> (raw)
It shows only one match per file, apparently because the process
invocations over the 'sudo' transport are recognized as working in a
terminal. At least by ripgrep.
To repro:
1. (setq xref-search-program 'ripgrep)
2. C-x C-f /sudo:dgutov@localhost:vc/emacs/ RET
3. M-x project-find-regexp RET associative RET
4. Note seeing only one match per file.
FWIW, the fix is really simple:
diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
index 0ee7dd5cad..2fd5e19237 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -1626,7 +1626,7 @@ xref-search-program-alist
(ripgrep
.
;; '!*/' is there to filter out dirs (e.g. submodules).
- "xargs -0 rg <C> --null -nH --no-messages -g '!*/' -e <R>"
+ "xargs -0 rg <C> --null -nH --no-heading --no-messages -g '!*/' -e
<R>"
))
"Associative list mapping program identifiers to command templates.
Is this okay for Emacs 28?
The problem might affect other Tramp transports as well (for all I
know), or maybe even other platforms. The risk for the fix seems minimal.
next reply other threads:[~2022-02-27 2:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-27 2:45 Dmitry Gutov [this message]
2022-02-27 7:31 ` bug#54177: 28.0.91; project-find-regexp misbehaves with ripgrep over tramp/sudo Eli Zaretskii
2022-02-27 13:07 ` Dmitry Gutov
2022-02-27 13:16 ` Eli Zaretskii
2022-02-27 13:28 ` Dmitry Gutov
2022-02-27 13:41 ` 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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=09caba9f-d927-352c-3a34-a28a414a0236@yandex.ru \
--to=dgutov@yandex.ru \
--cc=54177@debbugs.gnu.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).