Emacs: What is Mode Line (status bar)
mode line is a line at the bottom of a window pane that shows info about the current buffer, such as • Emacs: File Encoding used • buffer name (file name) • current Major Mode
The mode line show some info about the current buffer.
Mode Line Display Meaning
- You can hover mouse over the mode line part to show tooltips on what it means.
- You can mouse click the mode line part to do something useful, typically cycle alternative states.
- File Encoding and Newline Convention
The first character indicates encoding.
Umeans Unicode. Alt+x
list-coding-systemsto see a full list and explanation.
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.
---→ file not changed
**-→ file is modified
%%-→ read only
%*-→ read only and modified
If the last character is
@, the file is on a remote machine.
- Buffer Name
If the buffer is a file, it usually is the file name
Clicking on it switches buffer.
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
L27→ at line 27
If you have
(27,4)→ at line 27, column 4
- (major minor)
shows the current Major Mode and few Minor Mode and or possibly some other info.
- in recursive edit
(major minor)part is bracketed by square brackets, e.g.
It means you are in recursive edit.
Recursive Edit means you are calling a command before another command has finished. This often happens when you are coding elisp and there are errors and debugger is entered. Recursive Edit can be nested many times. Each level of recursive edit adds a square bracket.
To exit Recursive Edit:
- 【Ctrl+Meta+Ctrl 】
exit-recursive-edit→ exit the current level.
abort-recursive-edit→ exit all.
- 【Ctrl+Meta+Ctrl 】