Next: Command Example, Previous: Action Arguments, Up: Emacs Invocation
The initial options specify parameters for the Emacs session. This section describes the more general initial options; some other options specifically related to the X Window System appear in the following sections.
Some initial options affect the loading of the initialization file. Normally, Emacs first loads site-start.el if it exists, then your own initialization file if it exists, and finally the default initialization file default.el if it exists (see Init File). Certain options prevent loading of some of these files or substitute other files for them.
In batch mode, Emacs does not display the text being edited, and the
standard terminal interrupt characters such as C-z and C-c
have their usual effect. Emacs functions that normally print a
message in the echo area will print to either the standard output
stream (stdout
) or the standard error stream (stderr
)
instead. (To be precise, functions like prin1
, princ
and print
print to stdout
, while message
and
error
print to stderr
.) Functions that normally read
keyboard input from the minibuffer take their input from the
terminal's standard input stream (stdin
) instead.
‘--batch’ implies ‘-q’ (do not load an initialization file),
but site-start.el is loaded nonetheless. It also causes Emacs
to exit after processing all the command options. In addition, it
disables auto-saving except in buffers for which auto-saving is
explicitly requested, and when saving files it omits the fsync
system call unless otherwise requested.
The normal use of this option is in executable script files that run Emacs. They can start with this text on the first line
#!/usr/bin/emacs --script
which will invoke Emacs with ‘--script’ and supply the name of
the script file as file. Emacs Lisp then treats the ‘#!’
on this first line as a comment delimiter.
load-path
(see Init File). The ‘-Q’ option does this too.
inhibit-startup-screen
to non-nil
in your initialization file (see Entering Emacs).
inhibit-x-resources
to t
(see Resources).