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

I'm currently using Emacs on daemon mode. I save my sessions using the desktop package. I also combine that with this in order to have several named sessions saved. If I have several Emacs windows open they all open up in the same session and if I switch to another session all the Emacs windows switch to the same session. I would like to be able to have different session in different Windows. How can this be done?

share|improve this question

from the emacs info documentation:

You can run multiple Emacs servers on the same machine by giving
each one a unique "server name", using the variable `server-name'.  For
example, `M-x set-variable <RET> server-name <RET> foo <RET>' sets the
server name to `foo'.  The `emacsclient' program can specify a server by
name, using the `-s' option.

Does this help?

share|improve this answer
It sure works for me. – SamB Jan 2 '14 at 4:46
Note: when you set the server-name, the new name must be in quotes. – richard Mar 7 '14 at 11:39
It did not work for me at first. I thought I was running in server mode, it was behaving like it was, I used emacsclient to connect. But going to customise emacs -> top level -> external -> server -> server mode and switching it on, did the trick. – richard Mar 7 '14 at 11:43

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.