Questions tagged [mode-line]

The mode line is a useful summary information about the buffer shown in the window, including its name and current modes. It is located at the bottom of every Emacs Window aside from MiniBuffer windows.

Here is a screenshot that shows a windows with it's mode line (the gray bar at the bottom):

The mode-line

For complete information on the contents of mode lines, see mode line in the EmacsManual. The information in a mode line usually includes the following:

  1. Whether or not the buffer has been modified:

    • ** – modified since last save
    • -- – not modified since last save
    • %* – read-only, but modified
    • %% – read-only, not modified
  2. Buffer name.

  3. The name of one or more MajorModes or MinorModes of the buffer

  4. Line number of the TextCursor (and Point), and perhaps the column number.

  5. Position in buffer:

    • Top – the beginning of the buffer is shown in the window
    • Bot – the end of the buffer is shown in the window
    • All – all of the buffer is shown in the window
    • a percentage – percentage of the buffer above the top of the window.
  6. Coding system of the buffer.

  7. End-of-line translation.


Sources: ModeLine | Emacs Wiki

225 questions
107
votes
4 answers

How do I get a fancier mode line that uses solid colors and triangles?

People occasionally post screenshots with modelines that have solid colors and triangles: How do I replicate this effect?
Tikhon Jelvis
  • 6,152
  • 2
  • 27
  • 40
29
votes
9 answers

Hide list of minor modes in mode-line

I use quite a few minor modes and usually I know which minor mode is enabled in every major mode. If I really want to see the full list, I can run C-h v minor-mode-list. At the same time, my mode line get really clogged, so when I vertically split…
Mark Karpov
  • 4,893
  • 1
  • 24
  • 53
24
votes
1 answer

What piece of code in Emacs makes `line-number-mode` print "??" as line number in buffers with long lines?

I'm using line-number-mode to have an indicator of the current line in my modeline, however for large files or rather, files with long lines, it starts displaying two question marks instead of a line number. I've digged a bit and found out that…
wasamasa
  • 21,803
  • 1
  • 65
  • 97
22
votes
3 answers

A faster method to obtain `line-number-at-pos` in large buffers

The function line-number-at-pos (when repeated about 50 times) is causing a noticeable slow-down in semi-large buffers -- e.g., 50,000 lines -- when point is near the end of the buffer. By slow-down, I mean a combined total of about 1.35…
lawlist
  • 18,826
  • 5
  • 37
  • 118
21
votes
5 answers

How to count characters in buffer including spaces?

I need to see, how many characters contains my text, as I type. I found this pages of Emacs Wiki: Word count, and there is a solution very close to what I need: I used the second solution from this page (Show the number of words in the mode-line),…
Aglavra
  • 213
  • 1
  • 2
  • 4
21
votes
2 answers

Display list of words along bottom of frame?

I'd like to display 3 lists of words on separate lines horizontally along the bottom (although top would work too) of every emacs frame I have open. I've thought of 6 ways to do this, and they all have issues: My first thought was to add a line to…
Joseph Garvin
  • 2,061
  • 8
  • 21
19
votes
2 answers

How can I set different font sizes for buffers and for the mode-line?

I have this line in my init.el file to set the size of the font in all frames: (push '(font . "DejaVu Sans Mono-10") default-frame-alist) It works but i'd like to have a bigger font in all buffers while keeping a smaller one for the mode line (so…
undostres
  • 1,793
  • 12
  • 15
17
votes
2 answers

Moving the mode line and minibuffer to the top

Is there any way I can move the mode line and the minibuffer from the bottom to the top of the screen? The minibuffer is covered by the previous question How to display the content of minibuffer in the middle of the emacs frame?, so this question is…
Mongus Pong
  • 537
  • 4
  • 14
14
votes
4 answers

Make a new frame with only mode-line

I want to create a new frame that contains nothing but the mode-line. Especially not a file buffer. Why do I need this? I use org-mode's clocking to time my work. Org-mode displays the timer for the current task I'm working on in the mode-line, and…
13
votes
2 answers

Can I use an image in my modeline lighter?

My modeline is cluttered. Can I make it display pictures instead of mode names? I could use unicode Emoji (such as for Python or for Coq), but some machines on which I use my Emacs config do not have the right fonts pre-installed (ideally, I'd…
Clément
  • 3,924
  • 1
  • 22
  • 37
11
votes
2 answers

Single mode line for all windows

Is it possible to have only one mode line (sometimes referred as "statusbar") for all windows? I'd like to make this single mode line show information about the currently selected buffer.
rgtk
  • 414
  • 5
  • 9
11
votes
1 answer

Show something in active mode line instead of all mode lines

I set up an org-timer indicator in the mode line with this. (setq-default mode-line-format (quote ( ;; org-timer (:eval (unless (not org-timer-countdown-timer) (propertize (let* ((rtime (decode-time …
stardiviner
  • 1,888
  • 26
  • 45
11
votes
1 answer

More than one line in mode-line?

I would like to make modeline display all information not in one line but in two - for example first for cursor info, buffer, file, git and flycheck, and on second line - modes info (major and minor modes). Is it doable somehow? I googled…
sandric
  • 1,221
  • 9
  • 19
11
votes
3 answers

How can I display the parent directory of the current file in the modeline?

I would like to be able to see the location of the current file's parent directory, independent of the current buffer name.
secondplanet
  • 113
  • 1
  • 5
10
votes
2 answers

Transiently adjust text size in mode line and minibuffer?

When working with others around a shared monitor or via screen-sharing (e.g. Google Hangout), I often use text-scale-adjust (C-x C-+) to let others more easily read my screen. I would love to be able to also transiently increase the text size of the…
Colin Fraizer
  • 740
  • 4
  • 12
1
2 3
14 15