[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] master fd54102: * lisp/files.el (file-size-function):
From: |
Mattias Engdegård |
Subject: |
Re: [Emacs-diffs] master fd54102: * lisp/files.el (file-size-function): New defcustom |
Date: |
Fri, 26 Jul 2019 12:43:45 +0200 |
22 juli 2019 kl. 22.14 skrev Stefan Monnier <address@hidden>:
>
> 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).
Right, it is also intended for describing disk space, memory usage, etc. Given
that, I ended up with `byte-count-to-string-function' which is passable but
doesn't feel entirely satisfactory. Better name suggestions are welcome.
Since `file-size-human-readable' is used outside Emacs and a change in
semantics might break assumptions, I left it untouched. Instead, most calls to
that function were replaced with (function byte-count-to-string SIZE). If you
would rather that we add a function for this (byte-count-to-string, maybe)
instead of using the variable directly, this can be arranged.
22 juli 2019 kl. 19.29 skrev Eli Zaretskii <address@hidden>:
>
> Thanks. Please consider calling this out in NEWS and maybe also in
> the ELisp manual.
NEWS updated; thanks for reminding me. I couldn't find a natural place for it
in the manual.
Oleh, you had strong personal preferences for a particular format, and the
customisable variable should now accommodate your wishes in more places than
before. The default format was chosen for readability and standards compliance,
and for being unambiguous.
0001-Clean-up-file-size-function.patch
Description: Binary data
- Re: [Emacs-diffs] master fd54102: * lisp/files.el (file-size-function): New defcustom, Basil L. Contovounesios, 2019/07/20
- Re: [Emacs-diffs] master fd54102: * lisp/files.el (file-size-function): New defcustom, Eli Zaretskii, 2019/07/20
- Re: [Emacs-diffs] master fd54102: * lisp/files.el (file-size-function): New defcustom, Basil L. Contovounesios, 2019/07/20
- Re: [Emacs-diffs] master fd54102: * lisp/files.el (file-size-function): New defcustom, Mattias Engdegård, 2019/07/22
- Re: [Emacs-diffs] master fd54102: * lisp/files.el (file-size-function): New defcustom, Oleh Krehel, 2019/07/22
- Re: [Emacs-diffs] master fd54102: * lisp/files.el (file-size-function): New defcustom, Stefan Monnier, 2019/07/22
- Re: [Emacs-diffs] master fd54102: * lisp/files.el (file-size-function): New defcustom,
Mattias Engdegård <=
- Re: [Emacs-diffs] master fd54102: * lisp/files.el (file-size-function): New defcustom, Basil L. Contovounesios, 2019/07/26
- Re: [Emacs-diffs] master fd54102: * lisp/files.el (file-size-function): New defcustom, Mattias Engdegård, 2019/07/26
- Re: [Emacs-diffs] master fd54102: * lisp/files.el (file-size-function): New defcustom, Eli Zaretskii, 2019/07/22
Re: [Emacs-diffs] master fd54102: * lisp/files.el (file-size-function): New defcustom, Mattias Engdegård, 2019/07/20