unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Mattias Engdegård" <mattiase@acm.org>
Cc: 35756@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	[thread overview]
Message-ID: <83zhnlbp4l.fsf@gnu.org> (raw)
In-Reply-To: <28D42987-D855-4213-9111-DB01E0753D9A@acm.org> (message from Mattias Engdegård on Wed, 15 May 2019 22:02:50 +0200)

> From: Mattias Engdegård <mattiase@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.





  reply	other threads:[~2019-05-17  5:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-15 20:02 bug#35756: [PATCH] file-size-human-readable: fix glitches and add optional space Mattias Engdegård
2019-05-17  5:56 ` Eli Zaretskii [this message]
2019-05-17 11:01   ` Mattias Engdegård
2019-06-23 16:56     ` Lars Ingebrigtsen
2019-06-23 18:29       ` Mattias Engdegård

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83zhnlbp4l.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=35756@debbugs.gnu.org \
    --cc=mattiase@acm.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).