help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Converting an Integer into Human Readable String


From: Deniz Dogan
Subject: Re: Converting an Integer into Human Readable String
Date: Thu, 7 Apr 2011 13:34:32 +0200

2011/4/7 Nordlöw <address@hidden>:
> I looking for the function that prints file size on the mode-line in 
> size-indication-mode. I have searched for size-indication-mode in the source 
> but cannot find a code-references to it. So where is the function that prints 
> for example
>
> 22k
>
> when file is approximately 22 kilobytes big?
>
> What about difference between
> - kilobytes (kB), 1000 bytes, and
> - kibibytes (KiB), 1024 bytes, as defined at
>
> Shouldn't Emacs support both?
>
> This is of course not that hard to write but reinvent the wheel?
>
> http://en.wikipedia.org/wiki/Kibibyte
>

I believe what you're looking for can be found in bindings.el (L375)
and an explanation of the format string %I in the documentation of
mode-line-format. Where the actual "translation" takes place is still
a mystery to me.

-- 
Deniz Dogan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]