ARCHIVED: In Emacs, what is the mode line, and what information does it contain?

This content has been archived, and is no longer maintained by Indiana University. Information here may no longer be accurate, and links may no longer be available or reliable.

The mode line is the line, usually in inverse video, at the bottom of a window in Emacs. When there is only one window, the mode line will appear directly above the echo area (where the minibuffer appears). If there are multiple windows, each window will have a mode line underneath it.

By default, the mode line provides information about the buffer (file being edited), the mode, and what part of the buffer is displayed by the window. You can also make Emacs display other information here, such as the time and line numbers.

Most mode lines begin something like the following:

 --[]-Emacs: buffer

where buffer is the name of the file being edited and [] will actually be one of the following:

--
Indicates that the buffer has not been changed since the last save
**
Indicates that the buffer has been changed since the last save
%%
Indicates that the buffer is read-only (can't be changed)

This first section gives information about the document in the buffer.

To the right of this, within parentheses, will be the mode that Emacs is in, which affects its behavior. Typically, this means redefining a few keystrokes to be more useful for editing different kinds of files. Common modes are Text, Lisp, C, Fortran, Nroff, and TeX.

In addition, there are minor modes which are independent of the major modes and add functionality. Common minor modes are Auto Fill and Auto Save. Minor modes will sometimes display next to the Major mode. For example, if you are editing a text file and have Auto Fill turned on, the mode line will display:

 (Text Fill)

The last item that Emacs displays in the mode line by default is the position of the buffer the window is displaying. Appearing to the right of the mode, it will indicate the position with either a percentage (indicating how much of the document is above the top of the window) or a keyword:

All
Indicates that the entire buffer appears in the window
Top
Indicates that the window displays the top of the buffer
Bot
Indicates that the window displays the bottom of the buffer

At Indiana University, for personal or departmental Linux or Unix systems support, see Get help for Linux or Unix at IU.

This is document ablq in the Knowledge Base.
Last modified on 2018-01-18 10:27:45.

Contact us

For help or to comment, email the UITS Support Center.