* bug#54177: 28.0.91; project-find-regexp misbehaves with ripgrep over tramp/sudo
@ 2022-02-27 2:45 Dmitry Gutov
2022-02-27 7:31 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: Dmitry Gutov @ 2022-02-27 2:45 UTC (permalink / raw)
To: 54177
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.
^ permalink raw reply related [flat|nested] 6+ messages in thread
* bug#54177: 28.0.91; project-find-regexp misbehaves with ripgrep over tramp/sudo
2022-02-27 2:45 bug#54177: 28.0.91; project-find-regexp misbehaves with ripgrep over tramp/sudo Dmitry Gutov
@ 2022-02-27 7:31 ` Eli Zaretskii
2022-02-27 13:07 ` Dmitry Gutov
0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2022-02-27 7:31 UTC (permalink / raw)
To: Dmitry Gutov; +Cc: 54177
> Date: Sun, 27 Feb 2022 04:45:14 +0200
> From: Dmitry Gutov <dgutov@yandex.ru>
>
> --- 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?
Is this additional switch supported by all versions of 'rg'?
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#54177: 28.0.91; project-find-regexp misbehaves with ripgrep over tramp/sudo
2022-02-27 7:31 ` Eli Zaretskii
@ 2022-02-27 13:07 ` Dmitry Gutov
2022-02-27 13:16 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: Dmitry Gutov @ 2022-02-27 13:07 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 54177
On 27.02.2022 09:31, Eli Zaretskii wrote:
> Is this additional switch supported by all versions of 'rg'?
Yes, of course. It's been there from the beginning.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#54177: 28.0.91; project-find-regexp misbehaves with ripgrep over tramp/sudo
2022-02-27 13:07 ` Dmitry Gutov
@ 2022-02-27 13:16 ` Eli Zaretskii
2022-02-27 13:28 ` Dmitry Gutov
0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2022-02-27 13:16 UTC (permalink / raw)
To: Dmitry Gutov; +Cc: 54177
> Date: Sun, 27 Feb 2022 15:07:46 +0200
> Cc: 54177@debbugs.gnu.org
> From: Dmitry Gutov <dgutov@yandex.ru>
>
> On 27.02.2022 09:31, Eli Zaretskii wrote:
> > Is this additional switch supported by all versions of 'rg'?
>
> Yes, of course. It's been there from the beginning.
Then I'm okay with installing this on the release branch.
Thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#54177: 28.0.91; project-find-regexp misbehaves with ripgrep over tramp/sudo
2022-02-27 13:16 ` Eli Zaretskii
@ 2022-02-27 13:28 ` Dmitry Gutov
2022-02-27 13:41 ` Dmitry Gutov
0 siblings, 1 reply; 6+ messages in thread
From: Dmitry Gutov @ 2022-02-27 13:28 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 54177
On 27.02.2022 15:16, Eli Zaretskii wrote:
> Then I'm okay with installing this on the release branch.
Thanks, done.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#54177: 28.0.91; project-find-regexp misbehaves with ripgrep over tramp/sudo
2022-02-27 13:28 ` Dmitry Gutov
@ 2022-02-27 13:41 ` Dmitry Gutov
0 siblings, 0 replies; 6+ messages in thread
From: Dmitry Gutov @ 2022-02-27 13:41 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 54177-done
On 27.02.2022 15:28, Dmitry Gutov wrote:
> On 27.02.2022 15:16, Eli Zaretskii wrote:
>> Then I'm okay with installing this on the release branch.
>
> Thanks, done.
>
>
>
And closing.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-02-27 13:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-27 2:45 bug#54177: 28.0.91; project-find-regexp misbehaves with ripgrep over tramp/sudo Dmitry Gutov
2022-02-27 7:31 ` 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
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).