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?

1 Answer 1


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?

  • It sure works for me.
    – SamB
    Jan 2, 2014 at 4:46
  • Note: when you set the server-name, the new name must be in quotes. Mar 7, 2014 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. Mar 7, 2014 at 11:43

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.