@@ -1693,7 +1693,9 @@ each one a unique @dfn{server name}, using the variable
1693
1693
@code {server-name }. For example, @kbd {M-x set-variable @key {RET }
1694
1694
server-name @key {RET } "foo" @key {RET }} sets the server name to
1695
1695
@samp {foo }. The @code {emacsclient } program can specify a server by
1696
- name, using the @samp {-s } option (@pxref {emacsclient Options }).
1696
+ name, using the @samp {-s } or the @samp {-f } option (@pxref {emacsclient
1697
+ Options }), depending on whether or not the server uses a TCP socket
1698
+ (@pxref {TCP Emacs server }).
1697
1699
1698
1700
If you want to run multiple Emacs daemons (@pxref {Initial Options }),
1699
1701
you 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
1760
When you start a TCP Emacs server, Emacs creates a @dfn {server file }
1759
1761
containing the TCP information to be used by @command {emacsclient } to
1760
1762
connect to the server. The variable @code {server-auth-dir } specifies
1761
- the directory containing the server file; by default, this is
1763
+ the default directory containing the server file; by default, this is
1762
1764
@file {~/.emacs.d/server/ }. In the absence of a local socket with file
1763
1765
permissions, the permissions of this directory determine which users
1764
1766
can have their @command {emacsclient } processes talk to the Emacs
1765
- server.
1767
+ server. If @code {server-name } is an absolute file name, the server
1768
+ file is created where specified by that file name.
1766
1769
1767
1770
@vindex EMACS_SERVER_FILE @r {, environment variable }
1768
1771
To tell @command {emacsclient } to connect to the server over TCP with
1769
1772
a specific server file, use the @samp {-f } or @samp {--server-file }
1770
1773
option, or set the @env {EMACS_SERVER_FILE } environment variable
1771
1774
(@pxref {emacsclient Options }). If @code {server-auth-dir } is set to a
1772
- non-standard value, @command {emacsclient } needs an absolute file name
1773
- to the server file, as the default @code {server-auth-dir } is
1774
- hard-coded in @command {emacsclient } to be used as the directory for
1775
- resolving relative filenames.
1775
+ non-standard value, or if @code {server-name } is set to an absolute
1776
+ file name, @command {emacsclient } needs an absolute file name to the
1777
+ server file, as the default @code {server-auth-dir } is hard-coded in
1778
+ @command {emacsclient } to be used as the directory for resolving
1779
+ relative filenames.
1776
1780
1777
1781
@node Invoking emacsclient
1778
1782
@subsection Invoking @code {emacsclient }
@@ -1961,10 +1965,13 @@ evaluation performed is for side-effect rather than result.
1961
1965
1962
1966
@item -s @var {server-name }
1963
1967
@itemx -- socket-name=@var {server-name }
1964
- Connect to the Emacs server named @var {server-name }. The server name
1965
- is given by the variable @code {server-name } on the Emacs server. If
1966
- this option is omitted, @command {emacsclient } connects to the first
1967
- server it finds. (This option is not supported on MS-Windows.)
1968
+ Connect to the Emacs server named @var {server-name }. (This option is
1969
+ not supported on MS-Windows.) The server name is given by the
1970
+ variable @code {server-name } on the Emacs server. If this option is
1971
+ omitted, @command {emacsclient } connects to the first server it finds.
1972
+ If you set @code {server-name } of the Emacs server to an absolute file
1973
+ name, give the same absolute file name as @var {server-name } to this
1974
+ option to instruct @command {emacsclient } to connect to that server.
1968
1975
1969
1976
Alternatively, you can set the @env {EMACS_SOCKET_NAME } environment
1970
1977
variable to point to the server socket. (The command-line option
0 commit comments