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

From: Dmitry Gutov <[email-masked]>
Date: Fri, 26 Aug 2022 17:32:08 +0300

On 25.08.2022 22:51, André A. Gomes wrote:
> Michael Albinus<[email-masked]>  writes:
> 
> Hi Michael,
> 
>> Looks like you use the termux sshd server on Android, right? This is
>> sometimes tricky; I'm discussing this configuration also in bug#57044.
>>
>> Could you please try it again, starting with "emacs -Q" and making your
>> Tramp config manually, setting tramp-verbose to 10, and run the test?
>> The resulting debug buffer might tell us more.
> Indeed, termux sshd server on Android.  I'll investigate this further
> and get back to you.
> 
> 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?