From: "Basil L. Contovounesios" <contovob@tcd.ie>
To: Oleh Krehel <ohwoeowho@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel <emacs-devel@gnu.org>
Subject: Re: [Emacs-diffs] master fd54102: * lisp/files.el (file-size-function): New defcustom
Date: Sat, 20 Jul 2019 19:50:49 +0100 [thread overview]
Message-ID: <87sgr07d6e.fsf@tcd.ie> (raw)
In-Reply-To: <CAA01p3pLXdKZDx9w3_hbw00DJOZNsTBm0okL3xiyOj5W6umQxw@mail.gmail.com> (Oleh Krehel's message of "Sat, 20 Jul 2019 19:38:28 +0200")
Oleh Krehel <ohwoeowho@gmail.com> 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
next prev parent reply other threads:[~2019-07-20 18:50 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190719165710.17673.32987@vcs0.savannah.gnu.org>
[not found] ` <20190719165711.741F1206A7@vcs0.savannah.gnu.org>
2019-07-20 16:53 ` [Emacs-diffs] master fd54102: * lisp/files.el (file-size-function): New defcustom Basil L. Contovounesios
2019-07-20 17:06 ` Eli Zaretskii
2019-07-20 17:38 ` Oleh Krehel
2019-07-20 17:45 ` Eli Zaretskii
2019-07-20 17:50 ` Oleh Krehel
2019-07-20 17:56 ` Eli Zaretskii
2019-07-20 18:50 ` Basil L. Contovounesios [this message]
2019-07-22 15:26 ` Mattias Engdegård
2019-07-22 16:15 ` Oleh Krehel
2019-07-22 20:14 ` Stefan Monnier
2019-07-26 10:43 ` Mattias Engdegård
2019-07-26 14:39 ` Basil L. Contovounesios
2019-07-26 21:39 ` Mattias Engdegård
2019-07-22 17:29 ` Eli Zaretskii
2019-07-20 17:30 ` Mattias Engdegård
2019-07-20 18:48 ` Basil L. Contovounesios
2019-07-20 19:06 ` Mattias Engdegård
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sgr07d6e.fsf@tcd.ie \
--to=contovob@tcd.ie \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=ohwoeowho@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).