GNU bug report logs - #33757
27.0.50; dired-du-mode displays incorrect human readable file sizes for non-GNU systems

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: minor; Reported by: Matthew Newton <matt@HIDDEN>; dated Sat, 15 Dec 2018 07:35:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 33757 <at> debbugs.gnu.org:


Received: (at 33757) by debbugs.gnu.org; 15 Dec 2018 18:13:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 15 13:13:44 2018
Received: from localhost ([127.0.0.1]:49605 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gYERc-00068J-3h
	for submit <at> debbugs.gnu.org; Sat, 15 Dec 2018 13:13:44 -0500
Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:42915)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <matt@HIDDEN>) id 1gYERZ-000683-GN
 for 33757 <at> debbugs.gnu.org; Sat, 15 Dec 2018 13:13:42 -0500
Received: from compute6.internal (compute6.nyi.internal [10.202.2.46])
 by mailout.west.internal (Postfix) with ESMTP id 53253C2B;
 Sat, 15 Dec 2018 13:13:35 -0500 (EST)
Received: from mailfrontend1 ([10.202.2.162])
 by compute6.internal (MEProxy); Sat, 15 Dec 2018 13:13:35 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mnewton.com; h=
 content-type:mime-version:subject:from:in-reply-to:date:cc
 :content-transfer-encoding:message-id:references:to; s=fm2; bh=K
 yg21OpH0V7bOQwtdMteTRHzL8oRNvwcrMvnXDrBGR8=; b=cuB8KpUeQsdzOqTzx
 Cn7J/rJch6ElbGmlk15quNsv/jBXhoO7v/+ck9U5g1ZagHpfUE9L4cBFGH+CzZl1
 MJFGk1msbbU8etebeZUg6NIcqujggrK5rfJ0X8pYrKwiMI9h7kShgZZdjZJN5ksf
 c7YlG0EDyEz8zmXCAC7cB6LT/MVzjTuUhZPSj9E3YsT4vBIOl1OgmF4ijrYhCPJ7
 b8YDg7JPKpnqAZQCjglTue+SIyekDGJYFRfnADb70Srvxkf19EdUnsQx+kMn8pgm
 inrLjazIQwjCUpBDQzqKrs3J/nelw0PvMYGc6gbTQA68Ruetfzsz0HwDhlgTEkjZ
 SiBbw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-transfer-encoding:content-type
 :date:from:in-reply-to:message-id:mime-version:references
 :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender
 :x-sasl-enc; s=fm1; bh=Kyg21OpH0V7bOQwtdMteTRHzL8oRNvwcrMvnXDrBG
 R8=; b=Vz5xQCt57mYqQIEGJniQqcd+2l1Vc2miswzYPEiEeX+LfMORT54asjxlV
 WR8Lgh0xynPBNe0Z7Tl3aWd5DZRY9Mcaq40ve5kdQXCza+putkoFZi9fmdB7ibOV
 3XnmXK6NcaKn6WjPLR+6PSmmctP0xe/UpDfKT3pSv504WRfXQGZt1AfZ0TaHLauK
 0GsijmW1XAxUv4LqIrrKEY5yXXU+Dva6gjpErPWJLIMHwABOIxOhb6s2HQZJZHIt
 tSxZPuWWsegUWAhO8vHHTU31bQks0c/r/F69kBmQ41CJMbBiMUIzMXZBu0u9s8Vq
 PcMK7MOnORlBw4wo3m6QESvf766Cg==
X-ME-Sender: <xms:TkQVXC1EckgzkG8Ul3bbx0AE_aTGicumwjpeU6wEJbA4zt-K4d6mRA>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtkedrudehjedgudduvdcutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfhuthenuceurghilhhouhhtmecu
 fedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurheptggguffhjg
 ffgffkfhfvofesthhqmhdthhdtjeenucfhrhhomhepofgrthhthhgvficupfgvfihtohhn
 uceomhgrthhtsehmnhgvfihtohhnrdgtohhmqeenucfkphepudehjedrudefuddrvdehud
 drgeelnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrghtthesmhhnvgifthhonhdrtgho
 mhenucevlhhushhtvghrufhiiigvpedt
X-ME-Proxy: <xmx:TkQVXMv3LQPW5fYir2hhJSvle-YyXPUCx6GsEVxN0f0xJtPiX87cdw>
 <xmx:TkQVXGEv81x2KYgJz_M3GC8T-7OQTMvofdMP-JQGlShtHjTCUcOaRg>
 <xmx:TkQVXOK3qH85qxm_QkTApE3AxB4qlgMfsl1Wa7nJRi4HjeeecE51xA>
 <xmx:TkQVXDTfp8WELLvjwMHpuT-GDEN0s9JTREU10WWArqStXMbuDD-E3g>
Received: from [192.168.0.115] (157-131-251-49.fiber.dynamic.sonic.net
 [157.131.251.49])
 by mail.messagingengine.com (Postfix) with ESMTPA id 1CDC7E446A;
 Sat, 15 Dec 2018 13:13:34 -0500 (EST)
Content-Type: text/plain;
	charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 12.1 \(3445.101.1\))
Subject: Re: bug#33757: 27.0.50; dired-du-mode displays incorrect human
 readable file sizes for non-GNU systems
From: Matthew Newton <matt@HIDDEN>
In-Reply-To: <m2k1kbce1s.fsf@HIDDEN>
Date: Sat, 15 Dec 2018 10:13:33 -0800
Content-Transfer-Encoding: quoted-printable
Message-Id: <BC95159D-3040-4AF6-994A-A99358590E0E@HIDDEN>
References: <133EC18A-49D2-4665-9E31-ED25CDD8A7EF@HIDDEN>
 <m2k1kbce1s.fsf@HIDDEN>
To: Robert Pluim <rpluim@HIDDEN>
X-Mailer: Apple Mail (2.3445.101.1)
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 33757
Cc: 33757 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Hmm, right you are. I forgot that I had GNU core utils installed on my =
Mac.

I suggest two things:
1. Look for gdu in path and use that if possible.
2. Add something like `dired-du-used-space-units` to indicate whether =
file sizes are stored in bytes, kilobytes, whatever. Then modify =
`dired-du-count-sizes` to multiply appropriately.

I can submit a patch if you think that=E2=80=99s the way to go.

By the way, I just want to verify: Is this the right place to submit a =
bug report for dired-du?=




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#33757; Package emacs. Full text available.

Message received at 33757 <at> debbugs.gnu.org:


Received: (at 33757) by debbugs.gnu.org; 15 Dec 2018 09:52:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 15 04:52:43 2018
Received: from localhost ([127.0.0.1]:48961 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gY6cl-0005qk-Bc
	for submit <at> debbugs.gnu.org; Sat, 15 Dec 2018 04:52:43 -0500
Received: from mail-wr1-f41.google.com ([209.85.221.41]:34969)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rpluim@HIDDEN>) id 1gY6cj-0005qX-6Z
 for 33757 <at> debbugs.gnu.org; Sat, 15 Dec 2018 04:52:41 -0500
Received: by mail-wr1-f41.google.com with SMTP id 96so7655203wrb.2
 for <33757 <at> debbugs.gnu.org>; Sat, 15 Dec 2018 01:52:41 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:mail-copies-to:gmane-reply-to-list
 :date:in-reply-to:message-id:mime-version:content-transfer-encoding;
 bh=7vRX9dHXGTzQ47vNXN04nmx53m3OY6q8nDLQsdzb2zM=;
 b=rlD/CwBBESd1hZbdRaZNAZqREPU9ZPUlutkAlIuDKEBCB6r0K89uvVfbJ0zsyeAtq+
 yLJcDv2SBy/iW6nPgVIhg2E+M1Ku1ue6lnX/vDZaUDcbf5l8qy0TZycxVhy7ST+TvX0T
 DQRLanRjLtxS4ob1h3zW36+7gUFKE9Ael5VG6xgaijBgVxTncuDwwgA0/oIU4elTQDHw
 33yHONZuJ5P4yYP5swgXARZft6fS75uGdpWGv3+aoW/4+Gavf0/ujUi2XaS8KrqIK03B
 wVZ7jtSxANk7NbIx8lcPl4ayEXyGSAKpPa0OZjqvJyRIe76arAKaXRnKNX64ft70R/5u
 JXow==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:mail-copies-to
 :gmane-reply-to-list:date:in-reply-to:message-id:mime-version
 :content-transfer-encoding;
 bh=7vRX9dHXGTzQ47vNXN04nmx53m3OY6q8nDLQsdzb2zM=;
 b=WXQXTACQDy66bv+XNUufZrF23WlkKGWW76d18QR5GlRkwnIacn/FoQmtgpmDY50VpT
 MmVm093VmE1DMX07saLmiRYcrVEfZpmmldrg2qxaNeVHdYEC7lAEm8qVQ73fgH/dvbBa
 mXjqIxUev7b7v1wDC6yegnQFZREa9r+6ui4S67QtE9zWKFkkoRRx8/YnjreIQUgPhmYj
 wlEWETOQgX63pXurCJRtPJLKCTpajyHHCLoRoVLexoj5RyJhWDZvpfOLeD7lPNb7FUvD
 P/ebck4g+Qia4e0vvB8bDO4NWc57oI+5ssqERi3/Ac6lw+pJ6joveszfQY7lvqNuUyUz
 1e2w==
X-Gm-Message-State: AA+aEWaCbMurYjAF+FkUiIr5X0KYLXvrY8y/i6bCAuYrS1kWGdwYHm2c
 swA3Kl9CeyaNf/KQh9eb7xwfhCxW
X-Google-Smtp-Source: AFSGD/Wb8fT2RD75m2iQCPCgzicI1k+RP6GdYMIiDEMejDV/iygAF9Na6IGvwX4hvVYTQekuvWxbsw==
X-Received: by 2002:adf:a1d2:: with SMTP id v18mr4863745wrv.87.1544867554097; 
 Sat, 15 Dec 2018 01:52:34 -0800 (PST)
Received: from rpluim-mac (vav06-1-78-207-202-134.fbx.proxad.net.
 [78.207.202.134])
 by smtp.gmail.com with ESMTPSA id o17sm10602332wmg.35.2018.12.15.01.52.32
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Sat, 15 Dec 2018 01:52:32 -0800 (PST)
From: Robert Pluim <rpluim@HIDDEN>
To: Matthew Newton <matt@HIDDEN>
Subject: Re: bug#33757: 27.0.50;
 dired-du-mode displays incorrect human readable file sizes for
 non-GNU systems
References: <133EC18A-49D2-4665-9E31-ED25CDD8A7EF@HIDDEN>
X-Debbugs-No-Ack: yes
Mail-Copies-To: never
Gmane-Reply-To-List: yes
Date: Sat, 15 Dec 2018 10:52:31 +0100
In-Reply-To: <133EC18A-49D2-4665-9E31-ED25CDD8A7EF@HIDDEN> (Matthew
 Newton's message of "Fri, 14 Dec 2018 22:37:33 -0800")
Message-ID: <m2k1kbce1s.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 33757
Cc: 33757 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Matthew Newton <matt@HIDDEN> writes:

> * Reproduction
> 1. Run MacOS (Or I suspect any OS that is not GNU-based).
> 2. emacs -Q
> 3. M-x package-install RET dired-du RET
> 4. M-x dired RET ~ RET
> 5. M-x dired-du-mode RET
> 6. Notice that file sizes are displayed in kbytes, not bytes (they are di=
splayed in bytes in a GNU-based system)
> 7. M-x dired-du--toggle-human-readable RET
> 8. M-x z z (to enable file sizes displated in human readable form, i.e. s=
izes ending in k, M, G, T)
> 9. File sizes displayed are one order of magnitude smaller than their
> actual size (e.g. if the file size is 2MB then it will be displayed as
> 2kB)
>
> * Discussion
> The problem seems to arise when the custom variable
> dired-du-used-space-program is set. For a GNU-based system, it gets
> set to "du -sb" but for MacOS it gets set to "du -sk". Then later when
> the human readable sizes are calculated, this difference does not
> appear to be accounted for.
>
> Why do we make the distinction between a GNU-based system and anything
> else? Can we just change the logic setting dired-du-used-space-program
> to always run "du -sb=E2=80=9D?
>

$ uname -a
Darwin rpluim-mac 18.2.0 Darwin Kernel Version 18.2.0: Fri Oct  5 19:41:49 =
PDT 2018; root:xnu-4903.221.2~2/RELEASE_X86_64 x86_64
$ du -sb
du: illegal option -- b
usage: du [-H | -L | -P] [-a | -s | -d depth] [-c] [-h | -k | -m | -g]
[-x] [-I mask] [file ...]

IOW the fix will have to be in dired-du.

Robert




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#33757; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 15 Dec 2018 07:34:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 15 02:34:55 2018
Received: from localhost ([127.0.0.1]:48919 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gY4TO-0002Y5-RF
	for submit <at> debbugs.gnu.org; Sat, 15 Dec 2018 02:34:55 -0500
Received: from eggs.gnu.org ([208.118.235.92]:45345)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <matt@HIDDEN>) id 1gY3a9-00017t-Qm
 for submit <at> debbugs.gnu.org; Sat, 15 Dec 2018 01:37:50 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <matt@HIDDEN>) id 1gY3a3-0004Sp-PV
 for submit <at> debbugs.gnu.org; Sat, 15 Dec 2018 01:37:44 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:35744)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <matt@HIDDEN>) id 1gY3a3-0004Sg-K9
 for submit <at> debbugs.gnu.org; Sat, 15 Dec 2018 01:37:43 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:54945)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <matt@HIDDEN>) id 1gY3a2-00006z-Lh
 for bug-gnu-emacs@HIDDEN; Sat, 15 Dec 2018 01:37:43 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <matt@HIDDEN>) id 1gY3Zz-0004Qa-I3
 for bug-gnu-emacs@HIDDEN; Sat, 15 Dec 2018 01:37:42 -0500
Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:55769)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <matt@HIDDEN>) id 1gY3Zz-0004Lv-6P
 for bug-gnu-emacs@HIDDEN; Sat, 15 Dec 2018 01:37:39 -0500
Received: from compute6.internal (compute6.nyi.internal [10.202.2.46])
 by mailout.west.internal (Postfix) with ESMTP id 5E7C011A3
 for <bug-gnu-emacs@HIDDEN>; Sat, 15 Dec 2018 01:37:36 -0500 (EST)
Received: from mailfrontend1 ([10.202.2.162])
 by compute6.internal (MEProxy); Sat, 15 Dec 2018 01:37:36 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mnewton.com; h=
 from:content-type:content-transfer-encoding:mime-version:subject
 :message-id:date:to; s=fm2; bh=hE2BWruayRbAnX0SSYfxOXDAKBnPWrfrg
 zDHbcIvdIo=; b=5NqS9K22NCRZKYWDSfDAUB3qvntqfpUy3RRbxKV92UPV4mLQQ
 Z1wyIaRweK52z2bGTfxzQknu4+OoBi0pvwPYq/rfidXuSLSAKPiazZL4hOOYugPo
 dnn8ciqwmJweG4pHBPj9dlNB9hUWLpdBq/eNxceLhCfwwkQgYS3Y95SqjnP8Oqt3
 4l8SimM2R/QXuPQmB6/07Nc56FhSqvN5PJebY2HvZwWUn0ftUY1OKYTNOCWhuyYb
 6isRK7869gkfk3PTv5lDYw1+FASQMrgKq8bF8FS+wZChmFaW9GMXPZmpGclwzFbb
 sPOk3ZCZRqJYHzyoLv8ceiBdDXmvQRY+mzxYQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=content-transfer-encoding:content-type
 :date:from:message-id:mime-version:subject:to:x-me-proxy
 :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=hE2BWr
 uayRbAnX0SSYfxOXDAKBnPWrfrgzDHbcIvdIo=; b=c/DBLTTp0dhWGwVgl4Uy4v
 r0Oa+AutOqM9MpwDDTG+9hLFOR9o+DHvvdz41yDo06Zi41bzCc08yBi3HIoAvIoX
 sKZirnrfJHaue6cy7xupuyNGNflkeo/ELj3SxLlKkPJB1YdLiM1rPa9Qg6ibTjBa
 wrNCPc8mVwjfvHJ5Ieh8gpUdPuBSih8krte1VjUhRdilWG3WF10wI8orFw2pn57t
 bLXqXUxtRHVSywezLigMzd+oGuwCso8dmI/5964IvwIkLfY22sQr2/4dolKc1iSX
 nviBPbii6E1IS7RQMS+q7+HOZEZxjyrksK3dXM9DfCOQFFEDzPRO8YXEJpyNUV0g
 ==
X-ME-Sender: <xms:L6EUXEbpjZCh2YZXmVjGA8EJdxR_SmVo_aikspYh_hUWo1UyvNTHdg>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtkedrudehiedgleeiucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfquhhtnecuuegrihhlohhuthemucef
 tddtnecunecujfgurhephfgtgfgguffkfffvofesthhqmhdthhdtjeenucfhrhhomhepof
 grthhthhgvficupfgvfihtohhnuceomhgrthhtsehmnhgvfihtohhnrdgtohhmqeenucfk
 phepudehjedrudefuddrvdehuddrgeelnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrg
 htthesmhhnvgifthhonhdrtghomhenucevlhhushhtvghrufhiiigvpedt
X-ME-Proxy: <xmx:L6EUXKRAXDqFJiZZYAMHinEWGxJJCPP56HMSNt5qpoBApIIwbgbW4w>
 <xmx:L6EUXGyeue0nyy_htCVCckbF_kzIzOxxC44Joj_M8oo-p0KN4SWaTQ>
 <xmx:L6EUXM2J1x0z-29ye-MrS6MVoQ4K8JkqApnyAC9ac1XJiPl-ZfDJbQ>
 <xmx:L6EUXO4NNIA8Sc2NTEz_PnSWbj60OnMEX5FPB71f-mMDycXkbV5IBg>
Received: from [192.168.0.115] (157-131-251-49.fiber.dynamic.sonic.net
 [157.131.251.49])
 by mail.messagingengine.com (Postfix) with ESMTPA id 3D8EBE455C
 for <bug-gnu-emacs@HIDDEN>; Sat, 15 Dec 2018 01:37:35 -0500 (EST)
From: Matthew Newton <matt@HIDDEN>
Content-Type: text/plain;
	charset=utf-8
Content-Transfer-Encoding: quoted-printable
Mime-Version: 1.0 (Mac OS X Mail 12.1 \(3445.101.1\))
Subject: 27.0.50; dired-du-mode displays incorrect human readable file sizes
 for non-GNU systems
Message-Id: <133EC18A-49D2-4665-9E31-ED25CDD8A7EF@HIDDEN>
Date: Fri, 14 Dec 2018 22:37:33 -0800
To: bug-gnu-emacs@HIDDEN
X-Mailer: Apple Mail (2.3445.101.1)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
 [fuzzy]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.3 (----)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Sat, 15 Dec 2018 02:34:54 -0500
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.3 (-----)

* Reproduction
1. Run MacOS (Or I suspect any OS that is not GNU-based).
2. emacs -Q
3. M-x package-install RET dired-du RET
4. M-x dired RET ~ RET
5. M-x dired-du-mode RET
6. Notice that file sizes are displayed in kbytes, not bytes (they are =
displayed in bytes in a GNU-based system)
7. M-x dired-du--toggle-human-readable RET
8. M-x z z (to enable file sizes displated in human readable form, i.e. =
sizes ending in k, M, G, T)
9. File sizes displayed are one order of magnitude smaller than their =
actual size (e.g. if the file size is 2MB then it will be displayed as =
2kB)

* Discussion
The problem seems to arise when the custom variable =
dired-du-used-space-program is set. For a GNU-based system, it gets set =
to "du -sb" but for MacOS it gets set to "du -sk". Then later when the =
human readable sizes are calculated, this difference does not appear to =
be accounted for.

Why do we make the distinction between a GNU-based system and anything =
else? Can we just change the logic setting dired-du-used-space-program =
to always run "du -sb=E2=80=9D?


Cheers,
Matt

P.S. This is my first Emacs bug report so please help me out if I should =
report it differently.=




Acknowledgement sent to Matthew Newton <matt@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#33757; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

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