[Top][All Lists]

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

`file-attribute' accessors

From: Lars Magne Ingebrigtsen
Subject: `file-attribute' accessors
Date: Mon, 09 Apr 2012 15:56:28 +0200
User-agent: Gnus/5.130004 (Ma Gnus v0.4) Emacs/24.0.94 (gnu/linux)

I was reading code that said `(nth 7 (file-attributes file-name))', and
I had to look up the doc string of `file-attributes' and find item seven
to understand what the code was trying to do.

Wouldn't it be nice if we had accessor functions for these things
instead of making people write `nth 7'?  If the code said
`(file-attribute-size (file-attributes file-name))', that would have
made things more understandable.  (And probably easier to write, too,
since one wouldn't have to consult the `file-attributes' doc string
every time...)

If this sounds OK, I can add the, erm, 11 trivial accessor functions and
adjust the documentation of `file-attributes' in trunk.

(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]