Unexpected "recover" from non-existing tramp-login-program

Tim Landscheidt <[email protected]>
Newsgroups gmane.emacs.tramp
Organization https://www.tim-landscheidt.de/
Message-ID <[email protected]>
Hi,

while working with docker-tramp 0.1.1 and not setting
docker-tramp-docker-executable correctly on a Fedora system,
I noticed this odd behaviour:

| ELISP> (add-to-list 'tramp-methods
|                     '("test-dne"
|                       (tramp-login-program "does-not-exist")
|                       (tramp-login-args (nil ("exec" "-it") ("-u" "%u") ("%h") ("sh")))
|                       (tramp-remote-shell "/bin/sh")
|                       (tramp-remote-shell-args ("-i" "-c"))))
| (("test-dne"
|   (tramp-login-program "does-not-exist")
|   (tramp-login-args
|    (nil
|     ("exec" "-it")
|     ("-u" "%u")
|     ("%h")
|     ("sh")))
|   (tramp-remote-shell "/bin/sh")
|   (tramp-remote-shell-args
|    ("-i" "-c")))
|  […])

| ELISP> (find-file "/test-dne:does-not-exist-either:/etc/passwd")
| #<buffer passwd>
| ELISP>

The resulting buffer will contain the contents of
/etc/passwd on the primary system (well, there are no
others :-)).

My assumption is that technically this is not an error as
with the great power that Emacs gives to the user comes
great responsibility to set one's variables properly :-).

I have not debugged where this behaviour is rooted and
whether it can be "fixed" easily, but if TRAMP can detect
that the call to tramp-login-program fails, it would be nice
if it could croak.

Tim
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.