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       -nw, -t, --tty
48              open a new Emacs frame on the current terminal
49
50       -c, --create-frame
51              create a new frame instead of trying to use  the  current  Emacs
52              frame
53
54       -e, --eval
55              do  not  visit files but instead evaluate the arguments as Emacs
56              Lisp expressions.
57
58       -n, --no-wait
59              returns immediately without waiting for you to "finish" the buf‐
60              fer in Emacs.
61
62       -s, --socket-name=FILENAME
63              use socket named FILENAME for communication.
64
65       -f, --server-file=FILENAME
66              use TCP configuration file FILENAME for communication.  This can
67              also be specified via the `EMACS_SERVER_FILE' environment  vari‐
68              able.
69
70       -a, --alternate-editor=EDITOR
71              if  the  Emacs  server  is not running, run the specified editor
72              instead.  This can also be specified via the  `ALTERNATE_EDITOR'
73              environment  variable.   If  the  value  of  EDITOR is the empty
74              string, then Emacs is started in  daemon  mode  and  emacsclient
75              will try to connect to it.
76
77       -d, --display=DISPLAY
78              tell the server to display the files on the given display.
79
80       -V, --version
81              print version information and exit
82
83       -H, --help
84              print this usage information message and exit
85

SEE ALSO

87       The  program  is  documented fully in Using Emacs as a Server available
88       via the Info system.
89

AUTHOR

91       This   manual    page    was    written    by    Stephane    Bortzmeyer
92       <bortzmeyer@debian.org>,  for  the  Debian GNU/Linux system (but may be
93       used by others).
94

COPYING

96       This manual page is in the public domain.
97
98
99
100
101                                                                EMACSCLIENT(1)
Impressum