Just in case someone feels inclined to implement this.  Here is an
idea how to deal with the remote shell hanging up on us because of an
idle timeout.  The problem right now is that a command might hang
because Emacs doesn't know that the remote end of an ssh connection
(say) has closed the connection until Emacs tries to send something.

So, introduce a connection property (buffer-local variable in the
connection buffer) which notes the time when the last command was
sent.  Update this time with every command.

Before issuing a command, look at the property, and if more than N
seconds have passed since the last command was sent, suspect that the
connection might be closed.  Send a no-op command (echo hello, say)
just to make sure the connection is still alive.  If no reply comes
within T (timeout) seconds, assume the connection was severed, kill
the buffer and start over.

This should be fairly easy to do and effective.  Any ideas on what
value to use for N?  And for T?

kai
-- 
~/.signature: No such file or directory

Reply via email to