Emacs: Mode Line (Status Bar)

By Xah Lee. Date: . Last updated: .

What is Mode Line

mode line is a line at the bottom of a window pane that shows info about the current Buffer.

emacs mode line 2025-07-26
emacs mode line 2025-07-26
emacs mode line in terminal 2025-07-26 2ccd2
emacs mode line in terminal 2025-07-26 2ccd2

Mode Line Display Meaning

it has this form

      CS:CH-DFR  BUF      POS LINE   (MAJOR MINOR)

File Encoding and Newline Convention

emacs mode line 2025-07-25 1885e
emacs mode line 2025-07-25 1885e
emacs mode line 2025-07-25 18867
emacs mode line 2025-07-25 18867

The first part shows file encoding and newline convention used.

The first character indicates encoding. U means Unicode.

Example

U(Unix)
Unicode encoding with unix newline
U(Dos)
Unicode encoding with Microsoft Windows newline
U\
Unicode encoding with Microsoft Windows newline when on Windows.
U(Mac)
Unicode encoding with Classic Mac OS newline (1990s)

Modified Status

This is 3 characters.

Example

---
file not changed
**-
file is modified
%%-
read only
%*-
read only and modified

If the last character is @, the file is on a remote machine.

emacs mode line 2025-07-25 188a2
emacs mode line 2025-07-25 188a2

Buffer Name

If the buffer is a file, it usually is the file name

emacs mode line 2025-07-25 188ad
emacs mode line 2025-07-25 188ad

Cursor Position

emacs mode line 2025-07-25 188cd
emacs mode line 2025-07-25 188cd
ALL
all content are shown.
Top
cursor is at the top of buffer
nn%
cursor is at nn percent of buffer
Bot
cursor is at the bottom of buffer

Line Number

emacs mode line 2025-07-25 188ff
emacs mode line 2025-07-25 188ff
L27
at line 27
(27,4)
at line 27, column 4. (when column-number-mode is on.) 〔see Emacs Init: Show Cursor Column Position

Major Mode Name, Minor Names

emacs mode line 2025-07-25 18911
emacs mode line 2025-07-25 18911

shows the current Major Mode and few Minor Mode and or possibly some other info.

emacs mode line key macro 2023-08-29
keyboard macro recording in effect. 〔see Emacs: Key Macro

Recursive Edit

emacs 29 mode line recursive edit 2023-08-31
emacs 29 mode line recursive edit 2023-08-31

if the (MAJOR MINOR) part is bracketed by square brackets, e.g.

[(MAJOR MINOR)]

It means you are in recursive edit.

Reference

Emacs Principle