GNU Emacs supports command line arguments to request various actions when invoking Emacs. These are for compatibility with other editors and for sophisticated activities. We don't recommend using them for ordinary editing.
Arguments starting with `-' are options. Other arguments specify files to visit. Emacs visits the specified files while it starts up. The last file name on your command line becomes the current buffer; the other files are also present in other buffers. As usual, the special argument `--' says that all subsequent arguments are file names, not options, even if they start with `-'.
Emacs command options can specify many things, such as the size and position of the X window Emacs uses, its colors, and so on. A few options support advanced usage, such as running Lisp functions on files in batch mode. The sections of this chapter describe the available options, arranged according to their purpose.
There are two ways of writing options: the short forms that start with a single `-', and the long forms that start with `--'. For example, `-d' is a short form and `--display' is the corresponding long form.
The long forms with `--' are easier to remember, but longer to type. However, you don't have to spell out the whole option name; any unambiguous abbreviation is enough. When a long option takes an argument, you can use either a space or an equal sign to separate the option name and the argument. Thus, you can write either `--display sugar-bombs:0.0' or `--display=sugar-bombs:0.0'. We recommend an equal sign because it makes the relationship clearer, and the tables below always show an equal sign.
Most options specify how to initialize Emacs, or set parameters for the Emacs session. We call them initial options. A few options specify things to do: for example, load libraries, call functions, or exit Emacs. These are called action options. These and file names together are called action arguments. Emacs processes all the action arguments in the order they are written.
Go to the first, previous, next, last section, table of contents.