I am trying to run my python script with spacemacs + ipython on my remote machine. I found this and works: Running ipython remotely

But with this approach, everytimes when I lose connection with remote machine ,the Python Buffer just dead(shows no process in this buffer). Then I have to re-open a python buffer, and re-run what I have run in previous python buffer. This is kind of wasting time.

Is it possible to preserve Python buffer and automatic reconnect to it when network is reachable?

1 Answer 1


No, it is not possible to reconnect to a remote process when the connection has disappeared. This would require to use mosh or similar instead of ssh for remote connection. Tramp does not support this.

  • Thanks for replying So is there any approach to use ipython remotely in emacs/spacemacs, and keep the session even if I close my local emacs(like tmux does)?
    – boboray
    Commented Apr 10, 2016 at 13:15
  • No, not yet. It is on my todo list to support mosh or tmux or whatever in Tramp, but I haven't started. And for mosh it seems to be not possible, as mosh developers have said. Commented Apr 10, 2016 at 15:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.