Before you start
Learn what to expect from this tutorial, and how to get the most out of it.
The Emacs editing environment is a favorite of UNIX® developers. It's known around the world as the king of editors, but many users find it has a bit of a learning curve. The Emacs environment doesn't seem intuitive at first glance, and it doesn't work like other editors and word processors. But learning Emacs doesn't have to be difficult. Once you get going, you'll see how intuitive it is and become more comfortable with it after each use. This tutorial series (see Resources) shows you the way, taking you from the basics of Emacs, such as its features, philosophy, key-command layout, and methods for editing text, through many of its powerful editing features.
After completing this series (see Resources), you'll be able to comfortably use Emacs for everyday editing, be well on your way to Emacs proficiency, and have a good feel for many of the advanced capabilities of Emacs.
This is the fourth in a series of tutorials on learning Emacs (see Resources). Previous tutorials in this series on using the Emacs editor took you through some of the basics; this installment rounds out what you've learned so far with the special topics of options, registers, and bookmarks. Like many applications, Emacs has a number of command-line options that alter its functionality; in this tutorial, you learn how and when to use them—and you also learn the special Emacs facilities of registers and bookmarks, which are powerful ways of storing locations and other values for current and future editing sessions.
The primary objective of this tutorial is to show you how to use the Emacs command-line options, register, and bookmark facilities. It assumes that you've already taken the three previous tutorials in this series (see Resources) and have a basic understanding of text-editing techniques.
After working through this tutorial, you'll have learned a number of tricks for controlling your Emacs session: You'll have gained an understanding for how your Emacs editing environment can be modified and customized using various command-line options—including those for running Emacs non-interactively—and how you can use registers and bookmarks to save positions and data for later retrieval.
This tutorial builds on several concepts introduced in the first three tutorials in this series, so you should take them before attempting this tutorial (see Resources). The practice file you made in the first tutorial and used in the third tutorial is used again in the examples (see Downloads if you don't have it).
The special Emacs notation for representing keystrokes, which is used in this tutorial and throughout the series, is described in the introduction of the first tutorial of the series, "Emacs editing environment, Part 1: Learn the basics of Emacs" (see Resources).
Although this tutorial is written for all levels of UNIX expertise, it's helpful if you have at least a rudimentary understanding of the UNIX file system:
- File system hierarchy
This tutorial requires a user account on any UNIX-based system that has a recent copy of Emacs installed.
There are several varieties of Emacs; the original and most popular is GNU Emacs, which is published online by the GNU Project (see Resources).
You should have a recent copy of GNU Emacs—one that is at version 20 or greater. Versions 20 and 21 are the most commonly available, and development snapshots of version 22 are also available. This tutorial works with any of these versions for Emacs. If your system is running something older, it's time to upgrade.
To know what version of Emacs you have running, use the GNU-style
$ emacs --version GNU Emacs 220.127.116.11 Copyright (C) 2006 Free Software Foundation, Inc. GNU Emacs comes with ABSOLUTELY NO WARRANTY. You may redistribute copies of Emacs under the terms of the GNU General Public License. For more information about these matters, see the file named COPYING. $
Additionally, some parts of the tutorial showing graphical elements of Emacs operation deal specifically with the X Window System. To go through these sections, you should have an X server up and running.