[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Converting an Integer into Human Readable String
From: |
Drew Adams |
Subject: |
RE: Converting an Integer into Human Readable String |
Date: |
Thu, 7 Apr 2011 11:13:07 -0700 |
> > (format-mode-line "%I" 4060) -> "4.6k"
>
> Beware: this has side effects. It doesn't just return a string.
What side effects? Where are they documented?
Or is there a doc bug wrt this missing info?
In any case, what I wrote was incorrect. AFAICT there is no way to pass the
number that is to be interpreted as the buffer size by "%I", except by passing
an actual BUFFER of the given size as arg. This will do it, I guess, but it
seems a bit silly:
(with-temp-buffer
(insert (make-string 4060 ?*))
(format-mode-line "%I" nil nil (current-buffer)))
- Converting an Integer into Human Readable String, Nordlöw, 2011/04/07
- Re: Converting an Integer into Human Readable String, Deniz Dogan, 2011/04/07
- Re: Converting an Integer into Human Readable String, Eli Zaretskii, 2011/04/07
- RE: Converting an Integer into Human Readable String, Drew Adams, 2011/04/07
- Re: Converting an Integer into Human Readable String, Eli Zaretskii, 2011/04/07
- Re: Converting an Integer into Human Readable String, Thierry Volpiatto, 2011/04/07
- Message not available
- Message not available
- Re: Converting an Integer into Human Readable String, Thierry Volpiatto, 2011/04/08
- Re: Converting an Integer into Human Readable String, Eli Zaretskii, 2011/04/08
- Re: Converting an Integer into Human Readable String, Thierry Volpiatto, 2011/04/08
Re: Converting an Integer into Human Readable String, Pascal J. Bourguignon, 2011/04/08