Implement fast mosh client in Emacs

Implement fast mosh client in Emacs

Cancelled

Job Description

The mobile shell client (at mosh.mit.edu) is a remote terminal application that can be a replacement for SSH. I'm interested in a native Emacs client following the same design principles. Because of how a traditional terminal interface works, even local rendering of a tty in Emacs can require excessive time to redraw the screen. For example when I set TERM=xterm in an emacs terminal (such as ansi-term), and type "vim", it can take one or two seconds to draw a very large screen, as it serially processes the (ncurses?) requests to clear the screen. When TERM=vt100 it is quicker. However, regardless of what the TERM setting is, I believe that mosh bypasses this primitive serial way of updating the screen and so in principle can be much quicker. However, if in the process it needs to operate using a traditional tty/curses interface, in order to render similar things, it may need to default to slower antiquated ways of terminal updating (since it has been designed to work on various terminal programs). However, the native Emacs buffer interface can potentially work much more quickly, and also the process intensive code could be implemented in C. I'd like to have a very impressive speed response in interactive SSH use and I'd like to be able to see this in Emacs directly.

Further enhancements can include supporting features of tmux and GNU screen, so that it is possible to maintain various terminal windows simultaneously. Also this can aim to respond ideally to WINCH (window change) requests so that when an Emacs buffer is resized, the remote application(s) will do their best to rewrite the window avoiding refresh. I believe that the OS X Terminal.app handles window resizing pretty elegantly given its approach (as a traditional terminal application), since both increase and decrease of size work well as it reconstructs the window state as if the new size was there all along.