emacs-devel
[Top][All Lists]
Advanced

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

Re: Decoded time accessors


From: Lars Ingebrigtsen
Subject: Re: Decoded time accessors
Date: Mon, 08 Jul 2019 00:20:02 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Alan Mackenzie <address@hidden> writes:

> My limited experience of this is that people don't bother to write the
> necessary doc strings, or don't bother to write them properly, so one is
> left guessing at the precise semantics.  For example the doc string for
> `file-attribute-size' is poor, whereas the doc string for
> `file-attribute' is better, though still not perfect.  To understand the
> former, one must read _both_ doc strings.  This is not a win.

If you see code with

(if (> (file-attribute-size (file-attributes "some/file")) 1000)
    ...)

then I think the meaning of that would be pretty obvious to everybody?

The doc string could be more verbose, but I think it describes the
semantics pretty clearly?

----

file-attribute-size is a compiled Lisp function in ‘files.el’.

(file-attribute-size ATTRIBUTES)

  Probably introduced at or before Emacs version 26.1.

The integer size (in bytes) in ATTRIBUTES returned by ‘file-attributes’.


-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



reply via email to

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