unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#36329: 26.2; file-size-human-readable issues
@ 2019-06-22  8:33 Pierre Neidhardt
  2019-10-09 23:58 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Pierre Neidhardt @ 2019-06-22  8:33 UTC (permalink / raw)
  To: 36329


I could spot 2 issues with file-size-human-readable:

1. Trailing ".0".  Compare

--8<---------------cut here---------------start------------->8---
(file-size-human-readable 2047)
"2.0k"
(file-size-human-readable 2048)
"2k"
--8<---------------cut here---------------end--------------->8---

2. Spurious "i" in 'iec mode for bytes:

--8<---------------cut here---------------start------------->8---
(file-size-human-readable 1 'si)
"1"
--8<---------------cut here---------------end--------------->8---


In GNU Emacs 26.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.8)
Windowing system distributor 'The X.Org Foundation', version 11.0.12005000
Recent messages:
Compilation finished. (No warnings)  [0.00 secs]
Highlighting notes...
Compilation finished. (No warnings)  [0.00 secs]
Preparing compilation log...
Compilation finished. (No warnings)  [0.00 secs]
History item: 12; current regexp: ^(file-size-human-readable 2047 'iec)$
History item: 0; current regexp: ^(file-size-human-readable 2047 'iec)$
History item: 0; current regexp: ^(file-size-human-readable 2049 'iec)$
; pipelined request... (swank-repl:listener-eval "(file-size-human-readable 2159 'iec)
History item: 0; current regexp: ^(file-size-human-readable 2159 'iec)$

Configured using:
 'configure
 CONFIG_SHELL=/gnu/store/q19l04vd2za80mk1845pz7r8cz29qk43-bash-minimal-4.4.23/bin/bash
 SHELL=/gnu/store/q19l04vd2za80mk1845pz7r8cz29qk43-bash-minimal-4.4.23/bin/bash
 --prefix=/gnu/store/9nrncjaxygfrr9q749pymcw3l9vywh0k-emacs-26.2
 --enable-fast-install --with-modules --disable-build-details'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND DBUS GSETTINGS GLIB NOTIFY
ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS
GTK3 X11 XDBE XIM MODULES THREADS

Important settings:
  value of $LANG: en_US.utf8
  locale-coding-system: utf-8-unix

-- 
Pierre Neidhardt
https://ambrevar.xyz/





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#36329: 26.2; file-size-human-readable issues
  2019-06-22  8:33 bug#36329: 26.2; file-size-human-readable issues Pierre Neidhardt
@ 2019-10-09 23:58 ` Lars Ingebrigtsen
  2019-10-10  8:23   ` Pierre Neidhardt
  0 siblings, 1 reply; 3+ messages in thread
From: Lars Ingebrigtsen @ 2019-10-09 23:58 UTC (permalink / raw)
  To: Pierre Neidhardt; +Cc: 36329

Pierre Neidhardt <mail@ambrevar.xyz> writes:

> I could spot 2 issues with file-size-human-readable:
>
> 1. Trailing ".0".  Compare
>
> (file-size-human-readable 2047)
> "2.0k"
> (file-size-human-readable 2048)
> "2k"

I've now fixed this on the Emacs trunk.

> 2. Spurious "i" in 'iec mode for bytes:
>
> (file-size-human-readable 1 'si)
> "1"

The spurious "i" (not present in the example here) has already been
fixed, as far as I can tell.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#36329: 26.2; file-size-human-readable issues
  2019-10-09 23:58 ` Lars Ingebrigtsen
@ 2019-10-10  8:23   ` Pierre Neidhardt
  0 siblings, 0 replies; 3+ messages in thread
From: Pierre Neidhardt @ 2019-10-10  8:23 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 36329

[-- Attachment #1: Type: text/plain, Size: 516 bytes --]

Lars Ingebrigtsen <larsi@gnus.org> writes:

>> 2. Spurious "i" in 'iec mode for bytes:
>>
>> (file-size-human-readable 1 'si)
>> "1"
>
> The spurious "i" (not present in the example here) has already been
> fixed, as far as I can tell.

The right example was 

--8<---------------cut here---------------start------------->8---
(file-size-human-readable 1 'iec)
1iB
--8<---------------cut here---------------end--------------->8---

sorry about that!

-- 
Pierre Neidhardt
https://ambrevar.xyz/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-10-10  8:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-22  8:33 bug#36329: 26.2; file-size-human-readable issues Pierre Neidhardt
2019-10-09 23:58 ` Lars Ingebrigtsen
2019-10-10  8:23   ` Pierre Neidhardt

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).