added support for remote emacs shell