emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master 2b97e83cc1 2/2: Fix off-by-one file size formatting in ls-lis


From: Eli Zaretskii
Subject: Re: master 2b97e83cc1 2/2: Fix off-by-one file size formatting in ls-lisp
Date: Sat, 12 Feb 2022 21:38:40 +0200

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: emacs-devel@gnu.org,  larsi@gnus.org
> Date: Sat, 12 Feb 2022 14:15:54 -0500
> 
> >> >     * lisp/ls-lisp.el (ls-lisp-format, ls-lisp-format-file-size): The
> >> >     human-readable file sizes can be 7 characters wide (e.g.,
> >> >     "1016.1k") (bug#53937).
> >> 
> >> Why would we want the ".1" in "1016.1k"?
> >
> > See file-size-human-readable.
> 
> I know.  And I'm asking why `file-size-human-readable` gives so
> much accuracy.

It's a feature:

      (format (if (and (>= (mod file-size 1.0) 0.05)
                       (< (mod file-size 1.0) 0.95))
                  "%.1f%s%s"
                "%.0f%s%s")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]