unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* `file-attribute' accessors
@ 2012-04-09 13:56 Lars Magne Ingebrigtsen
  2012-04-09 14:19 ` Thierry Volpiatto
                   ` (2 more replies)
  0 siblings, 3 replies; 22+ messages in thread
From: Lars Magne Ingebrigtsen @ 2012-04-09 13:56 UTC (permalink / raw)
  To: emacs-devel

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/




^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2012-04-11  1:55 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-09 13:56 `file-attribute' accessors Lars Magne Ingebrigtsen
2012-04-09 14:19 ` Thierry Volpiatto
2012-04-09 14:40   ` Lars Magne Ingebrigtsen
2012-04-09 14:53     ` Thierry Volpiatto
2012-04-09 15:46     ` Ted Zlatanov
2012-04-09 16:29       ` Lars Magne Ingebrigtsen
2012-04-09 16:32       ` Stefan Monnier
2012-04-09 16:52         ` Ted Zlatanov
2012-04-10  1:48           ` Stefan Monnier
2012-04-11  1:55           ` Miles Bader
2012-04-09 15:32 ` Leo
2012-04-09 16:31   ` Stefan Monnier
2012-04-09 17:08     ` Drew Adams
2012-04-10  1:47       ` Stefan Monnier
2012-04-10 10:58         ` Thien-Thi Nguyen
2012-04-10 12:52           ` Stefan Monnier
2012-04-09 17:57     ` Leo
2012-04-09 16:33 ` Stefan Monnier
2012-04-09 17:35   ` Lars Magne Ingebrigtsen
2012-04-10  1:50     ` Stefan Monnier
2012-04-10  2:00       ` Lars Magne Ingebrigtsen
2012-04-10 12:56         ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).