GNU bug report logs - #35756
[PATCH] file-size-human-readable: fix glitches and add optional space

Previous Next

Package: emacs;

Reported by: Mattias Engdegård <mattiase <at> acm.org>

Date: Wed, 15 May 2019 20:11:01 UTC

Severity: minor

Tags: patch

Done: Mattias Engdegård <mattiase <at> acm.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Mattias Engdegård <mattiase <at> acm.org>
Cc: 35756 <at> debbugs.gnu.org
Subject: bug#35756: [PATCH] file-size-human-readable: fix glitches and add optional space
Date: Fri, 17 May 2019 08:56:26 +0300
> From: Mattias Engdegård <mattiase <at> acm.org>
> 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.




This bug report was last modified 5 years and 329 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.