[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
19.13 Optional Mode Line Features
The buffer percentage pos indicates the percentage of the buffer above the top of the window. You can additionally display the size of the buffer by typing M-x size-indication-mode to turn on Size Indication mode. The size will be displayed immediately following the buffer percentage like this:
POS of SIZE |
Here SIZE is the human readable representation of the number of characters in the buffer, which means that ‘k’ for 10^3, ‘M’ for 10^6, ‘G’ for 10^9, etc., are used to abbreviate.
If you have narrowed the buffer (see section Narrowing), the size of the accessible part of the buffer is shown.
The current line number of point appears in the mode line when Line Number mode is enabled. Use the command M-x line-number-mode to turn this mode on and off; normally it is on. The line number appears after the buffer percentage pos, with the letter ‘L’ to indicate what it is. See section Minor Modes, for more information about minor modes and about how to use this command.
If you have narrowed the buffer (see section Narrowing), the displayed
line number is relative to the accessible portion of the buffer.
Thus, it isn't suitable as an argument to goto-line
. (Use
what-line
command to see the line number relative to the whole
file.)
If the buffer is very large (larger than the value of
line-number-display-limit
), then the line number doesn't appear.
Emacs doesn't compute the line number when the buffer is large, because
that would be too slow. Set it to nil
to remove the limit.
Line-number computation can also be slow if the lines in the buffer
are too long. For this reason, Emacs normally doesn't display line
numbers if the average width, in characters, of lines near point is
larger than the value of the variable
line-number-display-limit-width
. The default value is 200
characters.
You can also display the current column number by turning on Column Number mode. It displays the current column number preceded by the letter ‘C’. Type M-x column-number-mode to toggle this mode.
Emacs can optionally display the time and system load in all mode
lines. To enable this feature, type M-x display-time or customize
the option display-time-mode
. The information added to the mode
line usually appears after the buffer name, before the mode names and
their parentheses. It looks like this:
hh:mmpm l.ll |
Here hh and mm are the hour and minute, followed always by
‘am’ or ‘pm’. l.ll is the average number of running
processes in the whole system recently. (Some fields may be missing if
your operating system cannot support them.) If you prefer time display
in 24-hour format, set the variable display-time-24hr-format
to t
.
The word ‘Mail’ appears after the load level if there is mail
for you that you have not read yet. On a graphical display you can use
an icon instead of ‘Mail’ by customizing
display-time-use-mail-icon
; this may save some space on the mode
line. You can customize display-time-mail-face
to make the mail
indicator prominent. Use display-time-mail-file
to specify
the mail file to check, or set display-time-mail-directory
to specify the directory to check for incoming mail (any nonempty regular
file in the directory is considered as “newly arrived mail”).
By default, the mode line is drawn on graphics displays with
3D-style highlighting, like that of a button when it is not being
pressed. If you don't like this effect, you can disable the 3D
highlighting of the mode line, by customizing the attributes of the
mode-line
face. See section Customizing Faces.
By default, the mode line of nonselected windows is displayed in a
different face, called mode-line-inactive
. Only the selected
window is displayed in the mode-line
face. This helps show
which window is selected. When the minibuffer is selected, since
it has no mode line, the window from which you activated the minibuffer
has its mode line displayed using mode-line
; as a result,
ordinary entry to the minibuffer does not change any mode lines.
You can disable use of mode-line-inactive
by setting variable
mode-line-in-non-selected-windows
to nil
; then all mode
lines are displayed in the mode-line
face.
You can customize the mode line display for each of the end-of-line
formats by setting each of the variables eol-mnemonic-unix
,
eol-mnemonic-dos
, eol-mnemonic-mac
, and
eol-mnemonic-undecided
to the strings you prefer.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |