Next 17.F: Windows Up 17: emacs Prev 17.D: Buffers Contents


Specialized

§ 17.E: emacs Mode Lines


If you look at the bottom of the screen in an emacs session, you see a little window, the command minibuffer, in which emacs prints the commands you enter and its feelings about them. Just above the command minibuffer is the mode line in which emacs tells you the style of the current session.

The mode line may look something like:

Here the asterisks near the front mean that you have modified this file (if it is unmodified, there would be five dashes). If the file is read only (unmodifiable), the asterisks are replaced by percent symbols (---%%-).

After the word Emacs:, is the name sample.doc of the currently active buffer. Following the filename is the mode type (Fundamental). At the end of the line is a percentage telling you how far you are from the top of the file.

The mode lets you specialize emacs for a specific language. If the language can be compiled (like Fortran, LaTeX, or C), you can even execute your file within emacs.

The Fundamental (general editing) mode is the default setting. Other common modes include

Try changing emacs to text-mode, using the command

The list above is of major modes. There are also minor modes used for finer tuning. Minor modes can be used in combination with major modes or with other minor ones.

One of the most useful minor modes is

This mode automatically adds a carriage return when you near the right margin while entering text.

Try changing to auto-fill mode

Type a few lines without the carriage return.

To turn off a minor mode, repeat the same command as used to turn on the mode. (Turning a command on and off like this is called toggeling and it is a common feature of Unix.)

For more information on specific modes, look at " Coping With Unix" or the emacs help. (Getting help in emacs will be discussed soon.)


Next 17.F: Windows Up 17: emacs Prev 17.D: Buffers Contents