unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Magne Ingebrigtsen <larsi@gnus.org>
To: emacs-devel@gnu.org
Subject: Re: `file-attribute' accessors
Date: Mon, 09 Apr 2012 19:35:49 +0200	[thread overview]
Message-ID: <m3zkak24ga.fsf@stories.gnus.org> (raw)
In-Reply-To: jwvfwccamsx.fsf-monnier+emacs@gnu.org

Stefan Monnier <monnier@iro.umontreal.ca> writes:

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

While writing the doc string to all the functions, it struck me that it
would be kinda nice if the definition of the function would be something
like

(defun file-attribute-size (elem)
  ...
  (if (stringp file)
      (nth 7 (file-attributes elem))
    (nth 7 elem)))

That is, the functions would accept both a string and a file attribute
list, and do the obvious thing in either case.

What do you think?

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




  reply	other threads:[~2012-04-09 17:35 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2012-04-10  1:50     ` Stefan Monnier
2012-04-10  2:00       ` Lars Magne Ingebrigtsen
2012-04-10 12:56         ` Stefan Monnier

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=m3zkak24ga.fsf@stories.gnus.org \
    --to=larsi@gnus.org \
    --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 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).