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

231 questions
22
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
  • 223
  • 1
  • 2
  • 4
11
votes
5 answers

How to right align some items in the modeline?

Given the following modeline configuration: (setq-default mode-line-format (list ;; Current buffer name "%b " ;; Major mode "[%m] " ;; Modified status "[%*] " ;; Cursor position "Line: %l/%i Column: %c")) I would…
mkaito
  • 791
  • 6
  • 16
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,928
  • 28
  • 46
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,271
  • 9
  • 20
10
votes
2 answers

How to append string that get's updated to mode line?

I would like to append some information (that changes over time) to the mode line format and then use it in the title. My thought being is that once a minute I would set the frame-title-format to be that of the mode-line-format + pomodoro…
Leo Ufimtsev
  • 4,558
  • 3
  • 23
  • 46
9
votes
2 answers

Display battery information only when unplugged?

display-battery-mode displays battery information, but I only want to use it when my computer is unplugged and running off battery power. Is there a way to set the display mode according to the power supply mode? Can I also get the temperature…
Nick
  • 4,473
  • 4
  • 26
  • 44
9
votes
2 answers

Make the mode-line display percentage and not "Top/Bottom/All"

Mode line's %p displays the percentage of the current view of the buffer: %p The percentage of the buffer text above the top of window, or ‘Top’, ‘Bottom’ or ‘All’. Note that the default mode line construct truncates this to three…
ClojureMostly
  • 225
  • 1
  • 5
7
votes
1 answer

How to increase the size of the mode-line

I was watching this video on someone's emacs configuration, and I noticed that his mode line seemed a lot better to look at than mine, but he didn't explain it in the video. Is there a way to replicate the mode line in the video, or to remove the…
Vityou
  • 73
  • 1
  • 3
6
votes
1 answer

Hide mode-line for minimap buffers

I know that I can hide the modebar for the current buffer using M - : (setq mode-line-format nil) However, I'd like to hide the mode-line for the 'MINIMAP' buffer created by the minimap package, which is never the "current" buffer since as soon as…
d-cmst
  • 275
  • 1
  • 5
6
votes
2 answers

How to re arrange things in mode line?

I have installed nyan-mode and mode line looks like this. I would like to move nyan cat to end of mode line and arrange all other items like column number, file name, modes to left side leaving empty space in middle. How can i re arrange items in…
Chillar Anand
  • 4,102
  • 1
  • 24
  • 52
5
votes
3 answers

Show the full path to the file

Windows 10, Emacs 25.1. Suppose I open file D:/temp/test/myfile.txt. But in the in the mode line show only file name (myfile.txt). But I need to show FULL path to file: D:/temp/test/myfile.txt This path can show on mode line OR in the frame…
a_subscriber
  • 4,062
  • 1
  • 18
  • 56
5
votes
2 answers

Temporarily show a message in the modeline?

How can I print a message for a period of time to the mode line and restore the default format afterwards?
clemera
  • 3,451
  • 14
  • 40
5
votes
1 answer

?? in the modeline instead of the line number

I have seen posts on the topic of getting "??" in the modeline instead of the line number. However despite my best efforts I can't get rid of the problem. I have put those settings in my config: (setq line-number-display-limit nil) (setq…
Emmanuel Touzery
  • 961
  • 1
  • 8
  • 17
4
votes
1 answer

Place time displayed in the beginning of modeline

I installed doom-emacs and modeline displayed as How could I place the time 10:55 AM in the beginning, since if more windows are opened and arranged horizontally, the directory names are long enough to push "displayed time" out of view?
Wizard
  • 1,251
  • 6
  • 17
3
votes
1 answer

Variable's value in mode-line?

I have this function that sets the isearch-filter-predicate variable to a predicate (function) from a list of predicates: (defun set-isearch-filter-predicate () (interactive) (unless (boundp 'IFP-default) (setq IFP-default…
Gabriele
  • 1,554
  • 9
  • 21
1
2 3