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.