Emacs: Mode Line (Status Bar)
What is Mode Line
mode line is a line at the bottom of a window pane that shows info about the current Buffer.
- Hover mouse on any part of the mode line to show tooltips on what it means.
- Mouse click the mode line part to do something useful, typically cycle alternative states.
Mode Line Display Meaning
it has this form
CS:CH-DFR BUF POS LINE (MAJOR MINOR)
- CS → character set. File Encoding.
- CH → change status
- D → D appears if the window is dedicated to its current buffer.
- FR → the selected frame name. It appears only on text terminals. The initial frame's name is F1.
- BUF → buffer name
- POS → cursor position
- LINE → line number
- Major Mode
- Minor Mode
File Encoding and Newline Convention
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.
Buffer Name
If the buffer is a file, it usually is the file name
Cursor Position
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
L27- at line 27
(27,4)- at line 27, column 4.
(when
column-number-modeis on.) 〔see Emacs Init: Show Cursor Column Position〕
Major Mode Name, Minor Names
shows the current Major Mode and few Minor Mode and or possibly some other info.
Recursive Edit
if the
(MAJOR MINOR)
part is bracketed by square brackets, e.g.
[(MAJOR MINOR)]
It means you are in recursive edit.
Reference
Emacs Principle
- Emacs: Principle, Command, Keys
- Emacs: Jargons (Glossary)
- Emacs: Mode Line (Status Bar)
- Emacs: Major Mode
- Emacs: Minor Mode
- Emacs Init: Hook
- Emacs: Minibuffer
- Emacs: Messages Buffer
- Emacs: Universal Argument (C-u prefix arg)
- Emacs: Repeat Last Command
- Emacs: Jump to Previous Position
- Emacs: Narrow to Region