Subject: bug#13151: 24.2; tramp with ido: enters self-killing loop when opening /ftp: and hitting enter.

From: Michael Albinus <[email-masked]>
Date: Sun, 16 Dec 2012 11:53:06 +0100

Arne Babenhauserheide <[email-masked]> writes:

> Hi Michael,

Hi Arne,

>> > \ Opening connection for arne@ftp using ssh
>> > Tramp: Opening connection for arne@ftp using ssh...done
>> > byte-code: Process died. If this happens repeatedly, try
>> > 
>> >     `M-x tramp-cleanup-this-connection`
>> 
>> I will try it. 
>
> Thank you very much!

The following patch ought to do this. Could you, please, check whether
it fits your test case?

--8<---------------cut here---------------start------------->8---
diff --git a/lisp/tramp.el b/lisp/tramp.el
index a4d36cb..3177119 100644
--- a/lisp/tramp.el
+++ b/lisp/tramp.el
@@ -1455,6 +1455,11 @@ an input event arrives.  The other arguments are passed to `tramp-error'."
           (or (and (bufferp buffer) buffer)
               (and (processp vec-or-proc) (process-buffer vec-or-proc))
               (tramp-get-connection-buffer vec-or-proc)))
+         (when (string-equal fmt-string "Process died")
+           (message
+            "%s\n    %s"
+            "Tramp failed to connect.  If this happens repeatedly, try"
+            "`M-x tramp-cleanup-this-connection'"))
          (sit-for 30))))))
 
 (defmacro with-parsed-tramp-file-name (filename var &rest body)
--8<---------------cut here---------------end--------------->8---

> Best wishes,
> Arne

Best regards, Michael.