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

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

bug#57385: 28.1.91; project-find-regexp fails over tramp


From: Dmitry Gutov
Subject: bug#57385: 28.1.91; project-find-regexp fails over tramp
Date: Sat, 27 Aug 2022 01:12:37 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1

On 26.08.2022 18:08, Michael Albinus wrote:
Dmitry Gutov <dgutov@yandex.ru> writes:

Hi Dmitry,

Dmitry, I tested project-find-regexp over Tramp with a "mundane"
system
and it failed regardless.  It seems I figured out why.  Shell-file-name
(in xref-matches-in-files) seems to get its value from the local
machine, not from the remote one.  Therefore, it can't possibly start
the grep process remotely.  Any on how to fix this?

Right.

Michael, do you perhaps have a suggestion how xref-matches-in-files
could use connection-local values for shell-file-name and
shell-command-switch (when available) without losing compatibility
with Emacs 26.1?

Hmm, the usual recommendation is to take
with-connection-local-variables, like

(with-connection-local-variables
   (xref--process-file-region (point-min)
                              (point-max)
                              shell-file-name
                              output
                              nil
                              shell-command-switch
                              command))

Unfortunately, the macro exists since Emacs 27 only, so you need to test
its availablility, and to use progn instead if it doesn't exist.

OK, I have just pushed a fix in commit 6edff5ac33 which will hopefully fit the requirements.

Andre, please test.

There is another trap, Tramp sets already the connection-local variable
shell-file-name to "/bin/sh". The user must overwrite this (or Tramp
must be pimped up to take whatever the user declares as "remote-shell").

Perhaps that's the value which is needed in this particular scenario? E.g., no bash installed on that system.





reply via email to

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