At the bottom of each window is a mode line, which describes what is going on in the current buffer. When there is only one window, the mode line appears right above the echo area; it is the next-to-last line in the frame. On a graphical display, the mode line is drawn with a 3D box appearance, and the mode line of the selected window has a brighter color than that of unselected windows to make it stand out. On a text-only terminal, the mode line is usually drawn in inverse video.
The text displayed in the mode line has the following format:
-cs:ch-fr buf pos line (major minor)------
The cs string and the colon character after it describe the character set and newline convention used for the current buffer. Normally, Emacs handles these settings intelligently, but it is sometimes useful to have this information.
cs describes the character set of the buffer (see Coding Systems). If it is a dash (‘-’), that indicates the default state of affairs: no special character set handling, except for the end-of-line translations described in the next paragraph. ‘=’ means no conversion whatsoever. Letters represent various nontrivial coding systems—for example, ‘1’ represents ISO Latin-1. On a text-only terminal, cs is preceded by two additional characters that describe the coding system for keyboard input and the coding system for terminal output. Furthermore, if you are using an input method, cs is preceded by a string that identifies the input method, which takes the form ‘i>’, ‘i+’, or ‘i@’ (see Input Methods).
The character after cs is usually a colon. However, under some circumstances a different string is displayed, which indicates a nontrivial end-of-line convention. Usually, lines of text are separated by newline characters, but two other conventions are sometimes used. The MS-DOS convention is to use a “carriage-return” character followed by a “linefeed” character; when editing such files, the colon changes to either a backslash (‘\’) or ‘(DOS)’, depending on the operating system. The Macintosh end-of-line convention is to use a “carriage-return” character instead of a newline; when editing such files, the colon indicator changes to either a forward slash (‘/’) or ‘(Mac)’. On some systems, Emacs displays ‘(Unix)’ instead of the colon for files that use newline as the line separator.
The next element on the mode line is the string indicated by ch. This shows two dashes (‘--’) if the buffer displayed in the window has the same contents as the corresponding file on the disk; i.e., if the buffer is “unmodified”. If the buffer is modified, it shows two stars (‘**’). For a read-only buffer, it shows ‘%*’ if the buffer is modified, and ‘%%’ otherwise.
The character after ch is normally a dash (‘-’). However, if the default-directory for the current buffer is on a remote machine, ‘@’ is displayed instead (see File Names).
fr gives the selected frame name (see Frames). It appears only on text-only terminals. The initial frame's name is ‘F1’.
buf is the name of the buffer displayed in the window. Usually, this is the same as the name of a file you are editing. See Buffers.
pos tells you whether there is additional text above the top of the window, or below the bottom. If your buffer is small and it is all visible in the window, pos is ‘All’. Otherwise, it is ‘Top’ if you are looking at the beginning of the buffer, ‘Bot’ if you are looking at the end of the buffer, or ‘nn%’, where nn is the percentage of the buffer above the top of the window. With Size Indication mode, you can display the size of the buffer as well. See Optional Mode Line.
line is the character ‘L’ followed by the line number at point. (You can display the current column number too, by turning on Column Number mode. See Optional Mode Line.)
major is the name of the major mode used in the buffer. A major mode is a principal editing mode for the buffer, such as Text mode, Lisp mode, C mode, and so forth. See Major Modes.
Some major modes display additional information after the major mode name. For example, Rmail buffers display the current message number and the total number of messages. Compilation buffers and Shell buffers display the status of the subprocess.
minor is a list of some of the minor modes turned on in the buffer. Minor modes are optional editing modes that provide additional features on top of the major mode. See Minor Modes.
Some features are listed together with the minor modes whenever they are turned on, even through they are not really minor modes. ‘Narrow’ means that the buffer being displayed has editing restricted to only a portion of its text (see Narrowing). ‘Def’ means that a keyboard macro is currently being defined (see Keyboard Macros).
In addition, if Emacs is inside a recursive editing level, square brackets (‘[...]’) appear around the parentheses that surround the modes. If Emacs is in one recursive editing level within another, double square brackets appear, and so on. Since recursive editing levels affect Emacs globally, not just one buffer, the square brackets appear in every window's mode line or not in any of them. See Recursive Edit.
You can change the appearance of the mode line as well as the format of its contents. See Optional Mode Line. In addition, the mode line is mouse-sensitive; clicking on different parts of the mode line performs various commands. See Mode Line Mouse.
blog comments powered by Disqus