When I was at VIM age, I used to enjoy working with screen which gives me the flexibility to switch between mulitple windows. And later I switched to emacs but I lost one of my favorite feature: screen session - when my putty window accidentally dies, all my windows are still there, if I attach back everything is there.

in emacs, I can also open quite a few different screens and switch between them, the thing is when my putty window is closed, everything there is gone. I would hope that I can attach back to the emacs I am working on, and I am pretty sure this monster can achieve this, any ideas ?


You can run emacs in screen, just like vim. For keys that conflict, such as C-a, you can use C-a a inside of screen to send the C-a to emacs. Another option is to run emacs in server mode. You can do this by launching emacs with --daemon. You can then connect to the emacs daemon with emacsclient.

emacs --daemon       # start the server
emacsclient filename # open a file in the server
emacsclient -c       # connect to the server without opening a new file
  • Under X Window M-x close-display-connection close Emacs without leaving server. – gavenkoa Mar 14 '14 at 11:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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