From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Klaus Straubinger Newsgroups: gmane.emacs.help Subject: Re: Converting an Integer into Human Readable String Date: Fri, 8 Apr 2011 08:35:39 +0200 () Organization: not organised Message-ID: References: <4fa1ed35-b35b-4c8d-bfca-d7fae8da913b@glegroupsg2000goo.googlegroups.com> <71350401EC6C46958001611853D0D855@us.oracle.com> <834o6aufdl.fsf@gnu.org> <8F4245F3ABA84D459CF61965581C8F31@us.oracle.com> <83zko1ucjd.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1302244844 24062 80.91.229.12 (8 Apr 2011 06:40:44 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 8 Apr 2011 06:40:44 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Apr 08 08:40:40 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Q85N2-00057o-IV for geh-help-gnu-emacs@m.gmane.org; Fri, 08 Apr 2011 08:40:40 +0200 Original-Received: from localhost ([127.0.0.1]:45344 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q85N2-0002Zz-15 for geh-help-gnu-emacs@m.gmane.org; Fri, 08 Apr 2011 02:40:40 -0400 Original-Path: usenet.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!bnewspeer01.bru.ops.eu.uu.net!bnewspeer00.bru.ops.eu.uu.net!emea.uu.net!news.sap-ag.de!news1!news.sap-ag.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 17 Original-NNTP-Posting-Host: +f4nMMsCSA2u9ptJ+dOvig.news.sap-ag.de Original-X-Trace: news.sap-ag.de 1302244538 26976 +f4nMMsCSA2u9ptJ+dOvig.news.sap-ag.de (8 Apr 2011 06:35:38 GMT) Original-X-Complaints-To: newsmaster@sap.com Original-NNTP-Posting-Date: Fri, 8 Apr 2011 06:35:38 +0000 (UTC) X-No-Archive: Yes User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 Mail-Copies-To: nobody Original-Xref: usenet.stanford.edu gnu.emacs.help:186582 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org X-Gmane-Expiry: 2011-04-22 Xref: news.gmane.org gmane.emacs.help:80693 Archived-At: Thierry Volpiatto wrote: > anything have a function for this: > > (anything-ff-human-size 4060) > ==> "4.0K" And there is url-pretty-length from url-util.el (which is part of GNU Emacs): (url-pretty-length 4060) ==> "3k" (In this example, the result is "3k" because 4060 is smaller than 4 * 1024.) -- Klaus Straubinger