Subject: Re: bug#29723: 25.3; `compile' doesn't honor `tramp-methods', always uses "/bin/sh"

From: Michael Albinus <[email-masked]>
Date: Sat, 09 Mar 2019 18:10:30 +0100

Michael Albinus <[email-masked]> writes:

Hi Daniel,

>> Starting with emacs -Q, execute the following:
>>
>> (require 'tramp)
>> (let ((scpx-method (cdr (assoc "scpx" tramp-methods))))
>>   (add-to-list 'scpx-method '(tramp-remote-shell "/bin/bash"))
>>   (add-to-list 'tramp-methods (cons "scpx" scpx-method)))
>>
>> Then use the "scpx" connection type to find a file on a remote host.
>> Then, use `shell-command' to run "echo $_".  I get an output of
>> "/bin/bash".  Then, run the same command with `compile'.  I get an
>> output of "/bin/sh".  I was expecting to again get "/bin/bash".
>
> This is the same problem as bug#24338, I will mark your report as
> duplicate.
>
> In fact, "/bin/sh" is hardcoded for remote compilation in function
> `compilation-start'. This shall be changed, using connection-local
> variables, see (info "(elisp) Connection Local Variables")
>
> It is on my todo list, but less prioritized. I would be happy if
> somebody else takes the ball, and implements this in `compilation-start'.

Finally, I've adapted connection-local variables accordingly, pushed to
the master branch. See the discussion in (info "(emacs) Connection Variables")

>> Thank you!
>> Daniel

Best regards, Michael.