diff options
| -rw-r--r-- | doc/emacs/misc.texi | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index 5ab6ff4382c..04c8b1963e6 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi | |||
| @@ -1444,22 +1444,32 @@ evaluate, @emph{not} as a list of files to visit. | |||
| 1444 | @itemx --server-file=@var{server-file} | 1444 | @itemx --server-file=@var{server-file} |
| 1445 | @cindex @env{EMACS_SERVER_FILE} environment variable | 1445 | @cindex @env{EMACS_SERVER_FILE} environment variable |
| 1446 | @cindex server file | 1446 | @cindex server file |
| 1447 | @vindex server-use-tcp | ||
| 1448 | @vindex server-host | ||
| 1447 | Specify a @dfn{server file} for connecting to an Emacs server via TCP. | 1449 | Specify a @dfn{server file} for connecting to an Emacs server via TCP. |
| 1448 | 1450 | ||
| 1449 | Usually, an Emacs server uses an operating system feature called a | 1451 | An Emacs server usually uses an operating system feature called a |
| 1450 | ``local socket'' to listen for connections. Some operating systems, | 1452 | ``local socket'' to listen for connections. Some operating systems, |
| 1451 | such as Microsoft Windows, do not support local sockets; in that case, | 1453 | such as Microsoft Windows, do not support local sockets; in that case, |
| 1452 | Emacs uses TCP instead. When you start the Emacs server (by calling | 1454 | Emacs uses TCP instead. When you start the Emacs server, Emacs |
| 1453 | @code{server-start}), Emacs creates a server file that contains some | 1455 | creates a server file containing some TCP information that |
| 1454 | TCP connection information. @command{emacsclient} needs this | 1456 | @command{emacsclient} needs for making the connection. By default, |
| 1455 | information to make the connection. By default, the file goes in the | 1457 | the server file is in @file{~/.emacs.d/server/}. On Microsoft |
| 1456 | @file{~/.emacs.d/server/}; on Microsoft Windows, if @env{HOME} is not | 1458 | Windows, if @command{emacsclient} does not find the server file there, |
| 1457 | set or the TCP configuration file cannot be found there, Emacs also | 1459 | it looks in the @file{.emacs.d/server/} subdirectory of the directory |
| 1458 | looks for the file in the @file{.emacs.d/server/} subdirectory of the | 1460 | pointed to by the @env{APPDATA} environment variable. You can tell |
| 1459 | directory pointed to by the @env{APPDATA} environment variable. You | 1461 | @command{emacsclient} to use a specific server file with the @samp{-f} |
| 1460 | can specify a server file to use with the @samp{-f @var{server-file}} | 1462 | or @samp{--server-file} option, or by setting the |
| 1461 | or @samp{--server-file=@var{server-file}} option, or by setting | 1463 | @env{EMACS_SERVER_FILE} environment variable. |
| 1462 | @env{EMACS_SERVER_FILE} environment variable to the file name. | 1464 | |
| 1465 | Even if local sockets are available, you can tell Emacs to use TCP by | ||
| 1466 | setting the variable @code{server-use-tcp} to @code{t}. One advantage | ||
| 1467 | of TCP is that the server can accept connections from remote machines. | ||
| 1468 | For this to work, you must (i) set the variable @code{server-host} to | ||
| 1469 | the hostname or IP address of the machine on which the Emacs server | ||
| 1470 | runs, and (ii) provide @command{emacsclient} with the server file. | ||
| 1471 | (One convenient way to do the latter is to put the server file on a | ||
| 1472 | networked file system such as NFS.) | ||
| 1463 | 1473 | ||
| 1464 | @item -n | 1474 | @item -n |
| 1465 | @itemx --no-wait | 1475 | @itemx --no-wait |