all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Alan Mackenzie <acm@muc.de>
Cc: emacs-devel@gnu.org
Subject: Re: Decoded time accessors
Date: Mon, 08 Jul 2019 00:20:02 +0200	[thread overview]
Message-ID: <m3r271trl9.fsf@gnus.org> (raw)
In-Reply-To: <20190707214326.GD4053@ACM> (Alan Mackenzie's message of "Sun, 7 Jul 2019 21:43:26 +0000")

Alan Mackenzie <acm@muc.de> 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	other threads:[~2019-07-07 22:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-07 19:33 Decoded time accessors Lars Ingebrigtsen
2019-07-07 19:52 ` Paul Eggert
2019-07-07 20:09   ` Lars Ingebrigtsen
2019-07-07 21:43 ` Alan Mackenzie
2019-07-07 22:20   ` Lars Ingebrigtsen [this message]
2019-07-07 22:25   ` Clément Pit-Claudel
2019-07-08 14:41   ` Eli Zaretskii
2019-07-09  0:12   ` Accessor functions vs nth (WAS: Decoded time accessors) Noam Postavsky
2019-07-10 10:02     ` João Távora
2019-07-29 12:29 ` Decoded time accessors Lars Ingebrigtsen

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3r271trl9.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=acm@muc.de \
    --cc=emacs-devel@gnu.org \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.