emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#54177: closed (28.0.91; project-find-regexp misbehaves with ripgrep


From: GNU bug Tracking System
Subject: bug#54177: closed (28.0.91; project-find-regexp misbehaves with ripgrep over tramp/sudo)
Date: Sun, 27 Feb 2022 13:42:02 +0000

Your message dated Sun, 27 Feb 2022 15:41:21 +0200
with message-id <6491e0ec-dc96-79e3-4901-5984cd8e4ce7@yandex.ru>
and subject line Re: bug#54177: 28.0.91; project-find-regexp misbehaves with 
ripgrep over tramp/sudo
has caused the debbugs.gnu.org bug report #54177,
regarding 28.0.91; project-find-regexp misbehaves with ripgrep over tramp/sudo
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
54177: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=54177
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: 28.0.91; project-find-regexp misbehaves with ripgrep over tramp/sudo Date: Sun, 27 Feb 2022 04:45:14 +0200 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0
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.



--- End Message ---
--- Begin Message --- Subject: Re: bug#54177: 28.0.91; project-find-regexp misbehaves with ripgrep over tramp/sudo Date: Sun, 27 Feb 2022 15:41:21 +0200 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0
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.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]