[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/
- `file-attribute' accessors,
Lars Magne Ingebrigtsen <=
- Re: `file-attribute' accessors, Thierry Volpiatto, 2012/04/09
- Re: `file-attribute' accessors, Lars Magne Ingebrigtsen, 2012/04/09
- Re: `file-attribute' accessors, Thierry Volpiatto, 2012/04/09
- Re: `file-attribute' accessors, Ted Zlatanov, 2012/04/09
- Re: `file-attribute' accessors, Lars Magne Ingebrigtsen, 2012/04/09
- Re: `file-attribute' accessors, Stefan Monnier, 2012/04/09
- Re: `file-attribute' accessors, Ted Zlatanov, 2012/04/09
- Re: `file-attribute' accessors, Stefan Monnier, 2012/04/09
- Re: `file-attribute' accessors, Miles Bader, 2012/04/10
Re: `file-attribute' accessors, Leo, 2012/04/09