[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Buffer size indicator on the mode line.
From: |
Lute Kamstra |
Subject: |
Buffer size indicator on the mode line. |
Date: |
Tue, 26 Aug 2003 16:46:11 +0200 |
User-agent: |
Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) |
A user recently asked (on comp.emacs) for a buffer size indicator on
the mode line. I liked idea and implemented it. Similar to the
line/column number indication, I wrote a size-indication-mode that
toggles displaying the buffer size on the mode line like this
... 19% 46673 (251,5) ...
To show the size, I added `(size-indication-mode " %i")' to
`mode-line-position' and implemented the `%i'-construct for
`mode-line-format'.
Do you people think this is a nice feature?
The indicator could be improved by printing the buffer size more human
readable by using K, M, G, T, etc. Gnulib and coreutils (fileutils)
offer this functionality through human.{c,h}, but this would add a new
library dependency. Maybe we can just steal human.{c,h} from gnulib?
Lute.
- Buffer size indicator on the mode line.,
Lute Kamstra <=