[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-diffs] master fd54102: * lisp/files.el (file-size-function):

From: Stefan Monnier
Subject: Re: [Emacs-diffs] master fd54102: * lisp/files.el (file-size-function): New defcustom
Date: Mon, 22 Jul 2019 16:14:52 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>> Agreed, and this defcustom (file-size-function) has a much more
>> general-sounding name and description than merited by its effects (which
>> are limited to the "available disk space" number in Dired and that's it).
> The name is fine in my opinion. It's a derivation of
> `file-size-human-readable'. The postfix "-function" means it's a
> customizable variable that will be `funcall'-ed. Here's how it works:

FWIW, I agree that the name is slightly misleading, in that it seems to
expect a function which takes a file name and returns the size of the
file (most naturally represented as an integer number of bytes).

So maybe something like `file-size-human-readable-function` is a better
choice (then make file-size-human-readable call it and rename the
current body of file-size-human-readable to something else,
e.g. file-size-human-readable--default tho maybe that name shouldn't
include "file" since it can also be used for other sizes).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]