(emacs)Entering Emacs

Next: Exiting Prev: Text Characters Up: Top

Entering and Exiting Emacs

   The usual way to invoke Emacs is with the shell command `emacs'.
Emacs clears the screen and then displays an initial help message and
copyright notice.  On a window system, Emacs opens a window of its own.
You can begin typing Emacs commands immediately afterward.

   Some operating systems insist on discarding all type-ahead when Emacs
starts up; they give Emacs no way to prevent this.  Therefore, it is
wise to wait until Emacs clears the screen before typing your first
editing command.

   If you run Emacs from a shell window under the X Window System, run
it in the background with `emacs&'.  This way, Emacs does not tie up
the shell window, so you can use it to run other shell commands while
Emacs operates its own X windows.

   When Emacs starts up, it makes a buffer named `*scratch*'.  That's
the buffer you start out in.  The `*scratch*' uses Lisp Interaction
mode; you can use it to type Lisp expressions and evaluate them, or you
can ignore that capability and simply doodle.  (You can specify a
different major mode for this buffer by setting the variable
`initial-major-mode' in your init file.  Note: Init File.)

   It is also possible to specify files to be visited, Lisp files to be
loaded, and functions to be called, by giving Emacs arguments in the
shell command line.  Note: Command Arguments.  But we don't recommend
doing this.  The feature exists mainly for compatibility with other

   Many other editors are designed to be started afresh each time you
want to edit.  You edit one file and then exit the editor.  The next
time you want to edit either another file or the same one, you must run
the editor again.  With these editors, it makes sense to use a command
line argument to say which file to edit.

   But starting a new Emacs each time you want to edit a different file
does not make sense.  For one thing, this would be annoyingly slow.  For
another, this would fail to take advantage of Emacs's ability to visit
more than one file in a single editing session.

   The recommended way to use GNU Emacs is to start it only once, just
after you log in, and do all your editing in the same Emacs session.
Each time you want to edit a different file, you visit it with the
existing Emacs, which eventually comes to have many files in it ready
for editing.  Usually you do not kill the Emacs until you are about to
log out.

automatically generated by info2www