From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#35756: [PATCH] file-size-human-readable: fix glitches and add optional space Date: Fri, 17 May 2019 08:56:26 +0300 Message-ID: <83zhnlbp4l.fsf@gnu.org> References: <28D42987-D855-4213-9111-DB01E0753D9A@acm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="75985"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 35756@debbugs.gnu.org To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri May 17 07:57:11 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hRVrj-000Jcr-AZ for geb-bug-gnu-emacs@m.gmane.org; Fri, 17 May 2019 07:57:11 +0200 Original-Received: from localhost ([127.0.0.1]:42856 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hRVrh-0001kd-Th for geb-bug-gnu-emacs@m.gmane.org; Fri, 17 May 2019 01:57:09 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:39042) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hRVrb-0001iM-4B for bug-gnu-emacs@gnu.org; Fri, 17 May 2019 01:57:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hRVra-0000Or-5O for bug-gnu-emacs@gnu.org; Fri, 17 May 2019 01:57:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43471) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hRVra-0000Ol-2R for bug-gnu-emacs@gnu.org; Fri, 17 May 2019 01:57:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hRVrZ-00062k-UO for bug-gnu-emacs@gnu.org; Fri, 17 May 2019 01:57:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 17 May 2019 05:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35756 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 35756-submit@debbugs.gnu.org id=B35756.155807260823204 (code B ref 35756); Fri, 17 May 2019 05:57:01 +0000 Original-Received: (at 35756) by debbugs.gnu.org; 17 May 2019 05:56:48 +0000 Original-Received: from localhost ([127.0.0.1]:57015 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hRVrM-00062C-36 for submit@debbugs.gnu.org; Fri, 17 May 2019 01:56:48 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:52843) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hRVrJ-00061x-Pr for 35756@debbugs.gnu.org; Fri, 17 May 2019 01:56:46 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:36660) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hRVrE-00007R-Fw; Fri, 17 May 2019 01:56:40 -0400 Original-Received: from [176.228.60.248] (port=2479 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hRVr7-0007Vw-MK; Fri, 17 May 2019 01:56:34 -0400 In-reply-to: <28D42987-D855-4213-9111-DB01E0753D9A@acm.org> (message from Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= on Wed, 15 May 2019 22:02:50 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:159434 Archived-At: > From: Mattias EngdegÄrd > Date: Wed, 15 May 2019 22:02:50 +0200 > > The `file-size-human-readable' function is very useful but could do with some better formatting: normally, a space goes between the number and unit; you don't write '3kg' or '25m/s' but '3 kg' and '25 m/s' (sloppy British newspapers notwithstanding). We could add an optional argument so that the caller can use the spacing of preference; the default should probably be no space, for compatibility. I have no opinion regarding the change, but I have a minor comment about the documentation: > +** The function 'file-size-human-readable' accepts another optional argument. > +The new third argument is a string put between the number and unit; > +if nil or omitted, the empty string is used. It is recommended to use > +a single space or non-breaking space for readability. This uses the passive tense too much. The "if nil or omitted, the empty string is used" part could be worded more clearly as "it defaults to the empty string". The "It is recommended" part is better worded as "We recommend". > +Optional third argument SPACE is a string put between the number and unit. > +If nil or omitted, the empty string is used. Same here. Thanks.