Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 ?

share|improve this question
up vote 3 down vote accepted

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
share|improve this answer
Under X Window M-x close-display-connection close Emacs without leaving server. – gavenkoa Mar 14 '14 at 11:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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