Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




C.2 Initial Options

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 init files. The normal actions of Emacs are to first load site-start.el if it exists, then your own init file ~/.emacs if it exists, and finally default.el if it exists. See Init File. Certain options prevent loading of some of these files or substitute other files for them.

-t device
Use device as the device for terminal input and output. ‘--terminal’ implies ‘--no-window-system’.
-d display
Use the X Window System and use the display named display to open the initial Emacs frame. See Display X, for more details.
Don't communicate directly with the window system, disregarding the DISPLAY environment variable even if it is set. This means that Emacs uses the terminal from which it was launched for all its display and input.

Run Emacs in batch mode. Batch mode is used for running programs written in Emacs Lisp from shell scripts, makefiles, and so on. You should also use the ‘-l’ option or ‘-f’ option, to invoke a Lisp program to do batch processing.

In batch mode, Emacs does not display the text being edited, and the standard terminal interrupt characters such as C-z and C-c continue to have their normal effect. The functions prin1, princ and print output to stdout instead of the echo area, while message and error messages output to stderr. Functions that would normally read from the minibuffer take their input from stdin instead.

--batch’ implies ‘-q’ (do not load an init 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 it has been explicitly requested.

--script file
Run Emacs in batch mode, like ‘--batch’, and then read and execute the Lisp code in file.

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 ‘#!’ as a comment delimiter.

Do not load your Emacs init file ~/.emacs, or default.el either. Regardless of this switch, site-start.el is still loaded. When invoked like this, Emacs does not allow saving options changed with the M-x customize command and its variants. See Easy Customization.
Do not load site-start.el. The options ‘-q’, ‘-u’ and ‘--batch’ have no effect on the loading of this file—this option and ‘-Q’ are the only options that block it.
Start emacs with minimum customizations. This is like using ‘-q’ and ‘--no-site-file’, but also disables the startup screen.
Do not display a splash screen on startup; this is equivalent to setting the variable inhibit-startup-message to non-nil.
Do not reload any saved desktop. See Saving Emacs Sessions.
-u user
Load user's Emacs init file ~user/.emacs instead of your own.
Enable the Emacs Lisp debugger for errors in the init file. See Entering the Debugger on an Error.
Do almost everything with single-byte buffers and strings. All buffers and strings are unibyte unless you (or a Lisp program) explicitly ask for a multibyte buffer or string. (Note that Emacs always loads Lisp files in multibyte mode, even if ‘--unibyte’ is specified; see Enabling Multibyte.) Setting the environment variable EMACS_UNIBYTE has the same effect (see General Variables).
Inhibit the effect of EMACS_UNIBYTE, so that Emacs uses multibyte characters by default, as usual.

  Published under the terms of the GNU General Public License Design by Interspire