Simon Chevolleau <simon.chevoll...@gmail.com> writes:

> Dear TRAMP community,

Hi Simon,

> I'm trying to figure out how to set connection local profiles properly.
> The problem is, when connecting through ssh using TRAMP, it never uses
> the profile I want.

When a connection-local variable is set in different profiles (as you do
with `shell-file-name', it depends on the order the profiles are taken
from connection-local-criteria-alist. There is always a setting for that
variable which is the last one, and it wins.

The Elisp manual doesn't discuss this case, so I don't know the order
such entries do apply.

> - connection-local-criteria-alist is a variable defined in
>     (((:application tramp :protocol "ssh" :user "username" :machine "remote")
>     remote-bird)
>     ((:protocol "ssh")
>     remote-bird)
>     ((:application tramp)
>     tramp-connection-local-default-system-profile 
> tramp-connection-local-default-shell-profile))
>
> I don't understand why the remote-bird profile is not used with that set up.
> Anything I could do to make it work ?

You have two entries which use the remote-bird profile. One entry is
enough, remove the entry with the criteria '(:protocol "ssh").

Try to reorder then entries in `connection-local-criteria-alist'.

> Best regards,
> Simon

Best regards, Michael.

Reply via email to