unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Basil L. Contovounesios" <contovob@tcd.ie>
Cc: ohwoeowho@gmail.com, emacs-devel@gnu.org
Subject: Re: [Emacs-diffs] master fd54102: * lisp/files.el (file-size-function): New defcustom
Date: Sat, 20 Jul 2019 20:06:51 +0300	[thread overview]
Message-ID: <83k1ccskic.fsf@gnu.org> (raw)
In-Reply-To: <87tvbgabra.fsf@tcd.ie> (contovob@tcd.ie)

> From: "Basil L. Contovounesios" <contovob@tcd.ie>
> Date: Sat, 20 Jul 2019 17:53:13 +0100
> Cc: Oleh Krehel <ohwoeowho@gmail.com>
> 
> ohwoeowho@gmail.com (Oleh Krehel) writes:
> 
> > branch: master
> > commit fd5410217ff23810edc16e97c10934ad622f8e4b
> > Author: Oleh Krehel <ohwoeowho@gmail.com>
> > Commit: Oleh Krehel <ohwoeowho@gmail.com>
> >
> >     * lisp/files.el (file-size-function): New defcustom
> 
> [I wish changes like this (and its recent predecessors, which caused
>  test failues that others had to fix), even if small, to central
>  user-facing features were instead discussed and tested a little before
>  being unilaterally pushed.]

Seconded.

> > +(defcustom file-size-function #'file-size-human-readable
> > +  "Function that transforms the number of bytes into a human-readable string."
> 
> The number of which bytes?  I think a phrase similar to "for display"
> would be more accurate than "human-readable" here.
> 
> > +  :type '(choice
> 
> Did you try radio+function-item instead of choice+const?  I usually find
> the former nicer, as recommended in (info "(elisp) Composite Types").
> 
> > +          (const :tag "default" file-size-human-readable)
> > +          (const :tag "iec"
> 
> Nit: Please capitalise and uppercase these tags, respectively.
> 
> > +           (lambda (size) (file-size-human-readable size 'iec " ")))
> 
> Please do not use an unevaluated anonymous function here.
> 
> > +          (function :tag "Custom function")))

This defcustom also needs a :version tag.



  reply	other threads:[~2019-07-20 17:06 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 [this message]
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
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=83k1ccskic.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=contovob@tcd.ie \
    --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).