aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorEli Zaretskii2019-01-04 15:55:59 +0200
committerEli Zaretskii2019-01-04 15:55:59 +0200
commitf6eacc468b8539be482260fa569e7b5ece07f4a2 (patch)
treeb15f8099a23bacfcf562c23d1fef5011ef0bea35 /doc
parentfe4922cbf01fa9161ffa142fc70972098d48186f (diff)
downloademacs-f6eacc468b8539be482260fa569e7b5ece07f4a2.tar.gz
emacs-f6eacc468b8539be482260fa569e7b5ece07f4a2.zip
Improve documentation of 'server-name'
* doc/emacs/misc.texi (Emacs Server, TCP Emacs server) (emacsclient Options): * lisp/server.el (server-name): Document the usage of 'server-name' to specify the server file as an absolute file name. (Bug#33934)
Diffstat (limited to 'doc')
-rw-r--r--doc/emacs/misc.texi29
1 files changed, 18 insertions, 11 deletions
diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi
index 13e18f8a71d..a3aa71e2672 100644
--- a/doc/emacs/misc.texi
+++ b/doc/emacs/misc.texi
@@ -1693,7 +1693,9 @@ each one a unique @dfn{server name}, using the variable
1693@code{server-name}. For example, @kbd{M-x set-variable @key{RET} 1693@code{server-name}. For example, @kbd{M-x set-variable @key{RET}
1694server-name @key{RET} "foo" @key{RET}} sets the server name to 1694server-name @key{RET} "foo" @key{RET}} sets the server name to
1695@samp{foo}. The @code{emacsclient} program can specify a server by 1695@samp{foo}. The @code{emacsclient} program can specify a server by
1696name, using the @samp{-s} option (@pxref{emacsclient Options}). 1696name, using the @samp{-s} or the @samp{-f} option (@pxref{emacsclient
1697Options}), depending on whether or not the server uses a TCP socket
1698(@pxref{TCP Emacs server}).
1697 1699
1698 If you want to run multiple Emacs daemons (@pxref{Initial Options}), 1700 If you want to run multiple Emacs daemons (@pxref{Initial Options}),
1699you can give each daemon its own server name like this: 1701you can give each daemon its own server name like this:
@@ -1758,21 +1760,23 @@ use @kbd{M-x server-generate-key} to get a random key.
1758 When you start a TCP Emacs server, Emacs creates a @dfn{server file} 1760 When you start a TCP Emacs server, Emacs creates a @dfn{server file}
1759containing the TCP information to be used by @command{emacsclient} to 1761containing the TCP information to be used by @command{emacsclient} to
1760connect to the server. The variable @code{server-auth-dir} specifies 1762connect to the server. The variable @code{server-auth-dir} specifies
1761the directory containing the server file; by default, this is 1763the default directory containing the server file; by default, this is
1762@file{~/.emacs.d/server/}. In the absence of a local socket with file 1764@file{~/.emacs.d/server/}. In the absence of a local socket with file
1763permissions, the permissions of this directory determine which users 1765permissions, the permissions of this directory determine which users
1764can have their @command{emacsclient} processes talk to the Emacs 1766can have their @command{emacsclient} processes talk to the Emacs
1765server. 1767server. If @code{server-name} is an absolute file name, the server
1768file is created where specified by that file name.
1766 1769
1767@vindex EMACS_SERVER_FILE@r{, environment variable} 1770@vindex EMACS_SERVER_FILE@r{, environment variable}
1768 To tell @command{emacsclient} to connect to the server over TCP with 1771 To tell @command{emacsclient} to connect to the server over TCP with
1769a specific server file, use the @samp{-f} or @samp{--server-file} 1772a specific server file, use the @samp{-f} or @samp{--server-file}
1770option, or set the @env{EMACS_SERVER_FILE} environment variable 1773option, or set the @env{EMACS_SERVER_FILE} environment variable
1771(@pxref{emacsclient Options}). If @code{server-auth-dir} is set to a 1774(@pxref{emacsclient Options}). If @code{server-auth-dir} is set to a
1772non-standard value, @command{emacsclient} needs an absolute file name 1775non-standard value, or if @code{server-name} is set to an absolute
1773to the server file, as the default @code{server-auth-dir} is 1776file name, @command{emacsclient} needs an absolute file name to the
1774hard-coded in @command{emacsclient} to be used as the directory for 1777server file, as the default @code{server-auth-dir} is hard-coded in
1775resolving relative filenames. 1778@command{emacsclient} to be used as the directory for resolving
1779relative filenames.
1776 1780
1777@node Invoking emacsclient 1781@node Invoking emacsclient
1778@subsection Invoking @code{emacsclient} 1782@subsection Invoking @code{emacsclient}
@@ -1961,10 +1965,13 @@ evaluation performed is for side-effect rather than result.
1961 1965
1962@item -s @var{server-name} 1966@item -s @var{server-name}
1963@itemx --socket-name=@var{server-name} 1967@itemx --socket-name=@var{server-name}
1964Connect to the Emacs server named @var{server-name}. The server name 1968Connect to the Emacs server named @var{server-name}. (This option is
1965is given by the variable @code{server-name} on the Emacs server. If 1969not supported on MS-Windows.) The server name is given by the
1966this option is omitted, @command{emacsclient} connects to the first 1970variable @code{server-name} on the Emacs server. If this option is
1967server it finds. (This option is not supported on MS-Windows.) 1971omitted, @command{emacsclient} connects to the first server it finds.
1972If you set @code{server-name} of the Emacs server to an absolute file
1973name, give the same absolute file name as @var{server-name} to this
1974option to instruct @command{emacsclient} to connect to that server.
1968 1975
1969Alternatively, you can set the @env{EMACS_SOCKET_NAME} environment 1976Alternatively, you can set the @env{EMACS_SOCKET_NAME} environment
1970variable to point to the server socket. (The command-line option 1977variable to point to the server socket. (The command-line option