From c45d9f61f7ecf77baf73e16985e484c0b2299401 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 18 May 2016 22:50:45 +0300 Subject: [PATCH] Improve documentation of 'server-name' * doc/emacs/misc.texi (Emacs Server): Fix example of setting 'server-name'. Mention how to do that with daemon sessions. (Bug#23576) --- doc/emacs/misc.texi | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index af2b6acd8a4..497a4abd71b 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi @@ -1596,10 +1596,17 @@ variable to @samp{emacsclient +%d %s}.} You can run multiple Emacs servers on the same machine by giving each one a unique @dfn{server name}, using the variable @code{server-name}. For example, @kbd{M-x set-variable @key{RET} -server-name @key{RET} foo @key{RET}} sets the server name to +server-name @key{RET} "foo" @key{RET}} sets the server name to @samp{foo}. The @code{emacsclient} program can specify a server by name, using the @samp{-s} option (@pxref{emacsclient Options}). + If you want to run multiple Emacs daemons (@pxref{Initial Options}), +you can give each daemon its own server name like this: + +@example + emacs --eval "(setq server-name \"foo\")" --daemon +@end example + @findex server-eval-at If you have defined a server by a unique server name, it is possible to connect to the server from another Emacs instance and evaluate Lisp -- 2.39.2