From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: "Basil L. Contovounesios" Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master fd54102: * lisp/files.el (file-size-function): New defcustom Date: Sat, 20 Jul 2019 19:50:49 +0100 Message-ID: <87sgr07d6e.fsf@tcd.ie> References: <20190719165710.17673.32987@vcs0.savannah.gnu.org> <20190719165711.741F1206A7@vcs0.savannah.gnu.org> <87tvbgabra.fsf@tcd.ie> <83k1ccskic.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="146291"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Eli Zaretskii , emacs-devel To: Oleh Krehel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jul 20 20:51:03 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1houRi-000bqa-9R for ged-emacs-devel@m.gmane.org; Sat, 20 Jul 2019 20:51:02 +0200 Original-Received: from localhost ([::1]:52496 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1houRg-0000Wk-Pj for ged-emacs-devel@m.gmane.org; Sat, 20 Jul 2019 14:51:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56748) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1houRZ-0000We-VP for emacs-devel@gnu.org; Sat, 20 Jul 2019 14:50:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1houRY-0000dJ-Kn for emacs-devel@gnu.org; Sat, 20 Jul 2019 14:50:53 -0400 Original-Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]:38780) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1houRY-0000bc-ET for emacs-devel@gnu.org; Sat, 20 Jul 2019 14:50:52 -0400 Original-Received: by mail-wm1-x342.google.com with SMTP id s15so10399564wmj.3 for ; Sat, 20 Jul 2019 11:50:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=mYf7rShBLW249c98DaVnD06Wv19MFJ3ahjvIpGBsquY=; b=LCXisLFsr3knaF9DEIWfdTItmGbz7sI5/3UzTrwhF9NEaV+R8b98kczNBUqFccds8F jFbSj7rwMTpkkCCDaMicanILXNK9hsnZIFWeCf6Lo6kGPo8c5RdC+7WqIQjQgsiMzSQR c5k0ZWK5UsFnMBdgt9X1PMVK5slic/Om25kjKgR8cEV/QLkrdh7q4l0VeYLFDF5CAPbA 4wku6IHydlJBPAzE3cXuufKGHKUHxlsXOpp6xi6FRPId/FjoU3a4nLvKH3M/H9pTebnh A/kSUsmOARJrRrRvimyrLNyKnsInwkiiE0ZRHdvf/amgf8Ed/ifr2xKBfiB6oWykldvG 3E+g== 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:date:in-reply-to :message-id:user-agent:mime-version; bh=mYf7rShBLW249c98DaVnD06Wv19MFJ3ahjvIpGBsquY=; b=hK8uK1YgtQxw/Zfa8bNMGXqbnhu7wagUW55D22lgnkxldEJrMPtzNPKD8I+PZS3lJd ZtRW7pXqGMnPC4+YT2S80C/VRIiVTXgx/FtHsOQA1oy5rm9a4Bw33KVUjV0NnyT9VSgy IoVG5ScT1excqzT5n1vESYeimNFDNs0de0qQh02S3D7YETXgUXxbI8OxhD3Z9MPIFquQ fDjWIt1RgN7ArmGSY+EkE2At14h44rToakR4oSSlJJrjPBtd0X5RllYQXLUr2+9OKn7r gdu2/u0dJ3D42hgNVOsDZhxu7VpHzuH3moWXMDuAjFZ7/ZULqLOuI321CbjCJ+t8d7Dg S01w== X-Gm-Message-State: APjAAAVrovO79cZ/Kn+2oG+l3aJMicrmYyUah5JMIX/BrZ1iXWhHb8Fi 8ZH4ZzQ4KiwWh4uh77OCuLCzJA== X-Google-Smtp-Source: APXvYqwk8L7cuQbumn70MI+y7KnWlZyMKsTraK6lRFF44tdbQZL4OjihUC3lHM6gbKmGFFklOWi/cQ== X-Received: by 2002:a05:600c:20c1:: with SMTP id y1mr55962035wmm.10.1563648651034; Sat, 20 Jul 2019 11:50:51 -0700 (PDT) Original-Received: from localhost ([2a02:8084:20e2:c380:92bd:1bfd:38fc:fae2]) by smtp.gmail.com with ESMTPSA id o6sm64953036wra.27.2019.07.20.11.50.50 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sat, 20 Jul 2019 11:50:50 -0700 (PDT) In-Reply-To: (Oleh Krehel's message of "Sat, 20 Jul 2019 19:38:28 +0200") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::342 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:238752 Archived-At: Oleh Krehel writes: >> > [I wish changes like this (and its recent predecessors, which caused >> > test failues that others had to fix) > > Sorry about that. I didn't realize where the tests were, since there's > no "make test" at top-level. There's 'make check' and the file test/README, as mentioned under "Testing your changes" in CONTRIBUTE. >> > even if small, to central >> > user-facing features were instead discussed and tested a little before >> > being unilaterally pushed.] >> >> Seconded. > > While I agree in general, in this case the user-visible change was > done around a year ago, and I noticed only now when I switched to > using Emacs27. The change from a year ago was displaying the amount of > free space in kilobytes, which is almost unusable. > I added a custom var with a reasonable default that any user can > easily change. Very uncontroversial change, IMO. New user options in central places like files.el (as opposed to some specialised package) usually warrant a RFC so as to establish which need they are addressing, whether this need masks some other issue, and whether the proposed change covers this need sufficiently well. Internal variables can come and go, but user options are user-facing contracts that are harder to change or get rid of. >> > Did you try radio+function-item instead of choice+const? I usually find >> > the former nicer, as recommended in (info "(elisp) Composite Types"). > > OK. > >> > > + (const :tag "default" file-size-human-readable) >> > > + (const :tag "iec" >> > >> > Nit: Please capitalise and uppercase these tags, respectively. > > OK. > >> > > + (lambda (size) (file-size-human-readable size 'iec " "))) >> > >> > Please do not use an unevaluated anonymous function here. > > OK. Further to [1], I should clarify that anonymous functions shouldn't be used as values in a user option's :type at all, regardless of whether the function is evaluated. [1]: * lisp/files.el (file-size-function): Add :version tag 45fc6f203e 2019-07-20 19:31:07 +0200 https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=45fc6f203e2fef528cb2bb0d7c0140e160c974e2 >> This defcustom also needs a :version tag. > > OK. I've pushed the requested changes. Thanks, -- Basil