1EMACSCLIENT(1)              General Commands Manual             EMACSCLIENT(1)
2
3
4

NAME

6       emacsclient - tells a running Emacs to visit a file
7

SYNOPSIS

9       emacsclient [options] files ...
10

DESCRIPTION

12       This manual page documents briefly the emacsclient command.  Full docu‐
13       mentation is available in the GNU Info format; see below.  This  manual
14       page  was originally written for the Debian GNU/Linux distribution, but
15       is not specific to that system.
16
17       emacsclient works in conjunction with the built-in Emacs server.
18
19       You can either call emacsclient directly or let other programs  run  it
20       for  you when necessary.  On GNU and Unix systems many programs consult
21       the environment variable EDITOR (sometimes also VISUAL) to  obtain  the
22       command  used  for editing.  Thus, setting this environment variable to
23       'emacsclient' will allow these programs to use an already running Emacs
24       for  editing.  Other operating systems might have their own methods for
25       defining the default editor.
26
27       For emacsclient to work, you need  an  already  running  Emacs  with  a
28       server.   Within  Emacs,  call the functions `server-start' or `server-
29       mode'.  (Your `.emacs' file can do this automatically if you add either
30       `(server-start)' or `(server-mode 1)' to it.)
31
32       When  you've finished editing the buffer, type `C-x #' (`server-edit').
33       This saves the file and sends a message back to the `emacsclient'  pro‐
34       gram  telling  it to exit.  The programs that use `EDITOR' wait for the
35       "editor" (actually, `emacsclient') to exit.  `C-x #'  also  checks  for
36       other  pending external requests to edit various files, and selects the
37       next such file.
38
39       If you set the variable `server-window' to a window or a frame, `C-x #'
40       displays the server buffer in that window or in that frame.
41
42

OPTIONS

44       The  programs  follow  the  usual  GNU  command  line syntax, with long
45       options starting with two dashes (`-').
46
47       -n, --no-wait
48              returns immediately without waiting for you to "finish" the buf‐
49              fer in Emacs.
50
51       -e, --eval
52              do  not  visit files but instead evaluate the arguments as Emacs
53              Lisp expressions.
54
55       -s, --socket-name=FILENAME
56              use socket named FILENAME for communication.
57
58       -f, --server-file=FILENAME
59              use TCP configuration file FILENAME for communication.  This can
60              also  be specified via the `EMACS_SERVER_FILE' environment vari‐
61              able.
62
63       -a, --alternate-editor=EDITOR
64              if the Emacs server is not running,  run  the  specified  editor
65              instead.   This can also be specified via the `ALTERNATE_EDITOR'
66              environment variable.
67
68       -d, --display=DISPLAY
69              tell the server to display the files on the given display.
70
71       -V, --version
72              print version information and exit
73
74       -h, --help
75              print this usage information message and exit
76

SEE ALSO

78       The program is documented fully in Using Emacs as  a  Server  available
79       via the Info system.
80

AUTHOR

82       This    manual    page    was    written    by    Stephane   Bortzmeyer
83       <bortzmeyer@debian.org>, for the Debian GNU/Linux system  (but  may  be
84       used by others).
85

COPYING

87       This manual page is in the public domain.
88
89
90
91
92                                                                EMACSCLIENT(1)
Impressum