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)
This commit is contained in:
parent
fe4922cbf0
commit
f6eacc468b
2 changed files with 26 additions and 12 deletions
|
|
@ -1693,7 +1693,9 @@ each one a unique @dfn{server name}, using the variable
|
||||||
@code{server-name}. For example, @kbd{M-x set-variable @key{RET}
|
@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
|
@samp{foo}. The @code{emacsclient} program can specify a server by
|
||||||
name, using the @samp{-s} option (@pxref{emacsclient Options}).
|
name, using the @samp{-s} or the @samp{-f} option (@pxref{emacsclient
|
||||||
|
Options}), depending on whether or not the server uses a TCP socket
|
||||||
|
(@pxref{TCP Emacs server}).
|
||||||
|
|
||||||
If you want to run multiple Emacs daemons (@pxref{Initial Options}),
|
If you want to run multiple Emacs daemons (@pxref{Initial Options}),
|
||||||
you can give each daemon its own server name like this:
|
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.
|
||||||
When you start a TCP Emacs server, Emacs creates a @dfn{server file}
|
When you start a TCP Emacs server, Emacs creates a @dfn{server file}
|
||||||
containing the TCP information to be used by @command{emacsclient} to
|
containing the TCP information to be used by @command{emacsclient} to
|
||||||
connect to the server. The variable @code{server-auth-dir} specifies
|
connect to the server. The variable @code{server-auth-dir} specifies
|
||||||
the directory containing the server file; by default, this is
|
the default directory containing the server file; by default, this is
|
||||||
@file{~/.emacs.d/server/}. In the absence of a local socket with file
|
@file{~/.emacs.d/server/}. In the absence of a local socket with file
|
||||||
permissions, the permissions of this directory determine which users
|
permissions, the permissions of this directory determine which users
|
||||||
can have their @command{emacsclient} processes talk to the Emacs
|
can have their @command{emacsclient} processes talk to the Emacs
|
||||||
server.
|
server. If @code{server-name} is an absolute file name, the server
|
||||||
|
file is created where specified by that file name.
|
||||||
|
|
||||||
@vindex EMACS_SERVER_FILE@r{, environment variable}
|
@vindex EMACS_SERVER_FILE@r{, environment variable}
|
||||||
To tell @command{emacsclient} to connect to the server over TCP with
|
To tell @command{emacsclient} to connect to the server over TCP with
|
||||||
a specific server file, use the @samp{-f} or @samp{--server-file}
|
a specific server file, use the @samp{-f} or @samp{--server-file}
|
||||||
option, or set the @env{EMACS_SERVER_FILE} environment variable
|
option, or set the @env{EMACS_SERVER_FILE} environment variable
|
||||||
(@pxref{emacsclient Options}). If @code{server-auth-dir} is set to a
|
(@pxref{emacsclient Options}). If @code{server-auth-dir} is set to a
|
||||||
non-standard value, @command{emacsclient} needs an absolute file name
|
non-standard value, or if @code{server-name} is set to an absolute
|
||||||
to the server file, as the default @code{server-auth-dir} is
|
file name, @command{emacsclient} needs an absolute file name to the
|
||||||
hard-coded in @command{emacsclient} to be used as the directory for
|
server file, as the default @code{server-auth-dir} is hard-coded in
|
||||||
resolving relative filenames.
|
@command{emacsclient} to be used as the directory for resolving
|
||||||
|
relative filenames.
|
||||||
|
|
||||||
@node Invoking emacsclient
|
@node Invoking emacsclient
|
||||||
@subsection Invoking @code{emacsclient}
|
@subsection Invoking @code{emacsclient}
|
||||||
|
|
@ -1961,10 +1965,13 @@ evaluation performed is for side-effect rather than result.
|
||||||
|
|
||||||
@item -s @var{server-name}
|
@item -s @var{server-name}
|
||||||
@itemx --socket-name=@var{server-name}
|
@itemx --socket-name=@var{server-name}
|
||||||
Connect to the Emacs server named @var{server-name}. The server name
|
Connect to the Emacs server named @var{server-name}. (This option is
|
||||||
is given by the variable @code{server-name} on the Emacs server. If
|
not supported on MS-Windows.) The server name is given by the
|
||||||
this option is omitted, @command{emacsclient} connects to the first
|
variable @code{server-name} on the Emacs server. If this option is
|
||||||
server it finds. (This option is not supported on MS-Windows.)
|
omitted, @command{emacsclient} connects to the first server it finds.
|
||||||
|
If you set @code{server-name} of the Emacs server to an absolute file
|
||||||
|
name, give the same absolute file name as @var{server-name} to this
|
||||||
|
option to instruct @command{emacsclient} to connect to that server.
|
||||||
|
|
||||||
Alternatively, you can set the @env{EMACS_SOCKET_NAME} environment
|
Alternatively, you can set the @env{EMACS_SOCKET_NAME} environment
|
||||||
variable to point to the server socket. (The command-line option
|
variable to point to the server socket. (The command-line option
|
||||||
|
|
|
||||||
|
|
@ -270,7 +270,14 @@ been consumed.")
|
||||||
"server")
|
"server")
|
||||||
"The name of the Emacs server, if this Emacs process creates one.
|
"The name of the Emacs server, if this Emacs process creates one.
|
||||||
The command `server-start' makes use of this. It should not be
|
The command `server-start' makes use of this. It should not be
|
||||||
changed while a server is running."
|
changed while a server is running.
|
||||||
|
If this is a file name with no leading directories, Emacs will
|
||||||
|
create a socket file by that name under `server-socket-dir'
|
||||||
|
if `server-use-tcp' is nil, else under `server-auth-dir'.
|
||||||
|
If this is an absolute file name, it specifies where the socket
|
||||||
|
file will be created. To have emacsclient connect to the same
|
||||||
|
socket, use the \"-s\" switch for local non-TCP sockets, and
|
||||||
|
the \"-f\" switch otherwise."
|
||||||
:group 'server
|
:group 'server
|
||||||
:type 'string
|
:type 'string
|
||||||
:version "23.1")
|
:version "23.1")
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue