From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: master 2b97e83cc1 2/2: Fix off-by-one file size formatting in ls-lisp Date: Sat, 12 Feb 2022 21:53:55 +0200 Message-ID: <83r187rhd8.fsf@gnu.org> References: <164464970577.18616.16858189491672331595@vcs2.savannah.gnu.org> <20220212070826.4B772C00895@vcs2.savannah.gnu.org> <83y22frjpy.fsf@gnu.org> <83tud3ri2n.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15091"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Feb 12 20:55:13 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nIyUD-0003i7-HV for ged-emacs-devel@m.gmane-mx.org; Sat, 12 Feb 2022 20:55:13 +0100 Original-Received: from localhost ([::1]:45126 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nIyUC-0002zH-0Z for ged-emacs-devel@m.gmane-mx.org; Sat, 12 Feb 2022 14:55:12 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:34916) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nIyT5-0002Dy-Pg for emacs-devel@gnu.org; Sat, 12 Feb 2022 14:54:04 -0500 Original-Received: from [2001:470:142:3::e] (port=47968 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nIyT5-0001py-7P; Sat, 12 Feb 2022 14:54:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=X6ocOJatR4F6axenIgEo14XHDC+Q5BRnvNMe34gcM+Y=; b=C8K6cKVfAQrs l74INsaXnfeP5NB0aE29H0EjXWHEzaMb+mNZUCgTosaN0yVDfVKZRsa+AKRopB3FesmgJNS0TOUCc AF+gN0NiD3YH93ytGkBuhWEXJ5S0VOQnKOVTa8s+OlVNKBtwn3fPPk8TFpfEJKMCzVMDM/D+Qbvtl dV70DCEPzN0g0Vfqj60lGuVRqy5a4pdL4tLjEOO86J/KIOj4NXK1EQ2qSAhvrr99TSwSSEGPqy08E kJOaTzJjaNaeoOENqpt8jPidrmwvl6RgAkh+eMpI4pd9EWZMXThtl4qQDV6AsY87Eh+yf4CnfoFdR N3nHj0vuy80VCwLjWntesw==; Original-Received: from [87.69.77.57] (port=3470 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nIyT4-0002k8-OP; Sat, 12 Feb 2022 14:54:03 -0500 In-Reply-To: (message from Stefan Monnier on Sat, 12 Feb 2022 14:42:07 -0500) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:286195 Archived-At: > From: Stefan Monnier > Cc: emacs-devel@gnu.org, larsi@gnus.org > Date: Sat, 12 Feb 2022 14:42:07 -0500 > > >> 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") > > Why is it a feature It's a feature by definition: there's code that intentionally does that. > to waste those two perfect good characters on such irrelevant > details? A feature doesn't have to be liked to be a feature.