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 program
34       telling it to exit.  The programs that use EDITOR wait for the "editor"
35       (actually, emacsclient) to exit.  "C-x #" also checks for other pending
36       external  requests  to  edit  various  files, and selects the next such
37       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       Most  options  follow  the  usual  GNU  command  line syntax, with long
45       options starting with two dashes ("-").
46
47       +line[:column]
48              Go to the specified  line  and  column.   A  missing  column  is
49              treated  as column 1.  This option applies only to the next file
50              specified.
51
52       -a, --alternate-editor=COMMAND
53              if the Emacs server is not running, run the specified shell com‐
54              mand instead.  This can also be specified via the ALTERNATE_EDI‐
55              TOR environment variable.  If the value of  ALTERNATE_EDITOR  is
56              the  empty string, run "emacs --daemon" to start Emacs in daemon
57              mode, and try to connect to it.
58
59       -c, --create-frame
60              create a new frame instead of trying to use  the  current  Emacs
61              frame
62
63       -F, --frame-parameters=ALIST
64              set the parameters of a newly-created frame.
65
66       -d, --display=DISPLAY
67              tell the server to display the files on the given display.
68
69       -e, --eval
70              do  not  visit files but instead evaluate the arguments as Emacs
71              Lisp expressions.
72
73       -f, --server-file=FILENAME
74              use TCP configuration file FILENAME for communication.  This can
75              also  be  specified  via the EMACS_SERVER_FILE environment vari‐
76              able.
77
78       -n, --no-wait
79              returns immediately without waiting for you to "finish" the buf‐
80              fer in Emacs.  If combined with --eval, this option is ignored.
81
82       -nw, -t, --tty
83              open a new Emacs frame on the current terminal
84
85       -s, --socket-name=FILENAME
86              use  socket  named FILENAME for communication.  This can also be
87              specified via the EMACS_SOCKET_NAME environment variable.
88
89       -V, --version
90              print version information and exit
91
92       -H, --help
93              print this usage information message and exit
94

EXIT STATUS

96       Normally, the exit status is 0.  If emacsclient shuts down due to Emacs
97       signaling an error, the exit status is 1.
98

SEE ALSO

100       The  program  is  documented fully in Using Emacs as a Server available
101       via the Info system.
102

AUTHOR

104       This   manual    page    was    written    by    Stephane    Bortzmeyer
105       <bortzmeyer@debian.org>,  for  the  Debian GNU/Linux system (but may be
106       used by others).
107

COPYING

109       This manual page is in the public domain.
110
111
112
113                                                                EMACSCLIENT(1)
Impressum