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

EXIT STATUS

90       Normally, the exit status is 0.  If emacsclient shuts down due to Emacs
91       signaling an error, the exit status is 1.
92

SEE ALSO

94       The program is documented fully in Using Emacs as  a  Server  available
95       via the Info system.
96

AUTHOR

98       This    manual    page    was    written    by    Stephane   Bortzmeyer
99       <bortzmeyer@debian.org>, for the Debian GNU/Linux system  (but  may  be
100       used by others).
101

COPYING

103       This manual page is in the public domain.
104
105
106
107
108                                                                EMACSCLIENT(1)
Impressum