[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: using libmagic in Emacs?
From: |
Eli Zaretskii |
Subject: |
Re: using libmagic in Emacs? |
Date: |
Thu, 20 Aug 2009 21:20:13 +0300 |
> From: "Stephen J. Turnbull" <address@hidden>
> Cc: address@hidden,
> address@hidden,
> address@hidden
> Date: Thu, 20 Aug 2009 13:50:13 +0900
>
> Eli Zaretskii writes:
>
> > > I think the main interface should be just "file-magic", even if it's
> > > not in file.el. It's analogous to "file-attributes", etc.
> >
> > Actually, I think the interface should be `file-type' or some such.
>
> Seriously, "file-type" is a terrible, ambiguous name. DOS vs. Unix,
> the extension of the file's name (!!), what program uses it, text
> vs. binary, MIME type, endianness of the platform, Unicode vs. legacy
> coding, copyleft vs. permissive vs. proprietary vs. public domain, I
> could go on. Sure, it's about "files", but the "type" is what file(1)
> infers from magic numbers in the file, no more and no less ... and
> exactly the people you expect to say "huh?" will proceed to guess
> anything but the truth about the semantics of `file-type'.
Maybe so, but still "man file" shows this at the very first line:
file - determine file type
> I suppose the more explicit `file-type-by-magic' might be better.
I'm okay with that as well, but maybe `file-type-by-magic-signature'
is even better (if we indeed want to advertise its inner workings).
But if this function will fall back on something else if libmagic is
not available, then I think this name is not a good one.
Re: using libmagic in Emacs?, joakim, 2009/08/19
- Re: using libmagic in Emacs?, Dan Nicolaescu, 2009/08/19
- Re: using libmagic in Emacs?, Stephen J. Turnbull, 2009/08/19
- Re: using libmagic in Emacs?, Eli Zaretskii, 2009/08/19
- Re: using libmagic in Emacs?, Stephen J. Turnbull, 2009/08/20
- Re: using libmagic in Emacs?,
Eli Zaretskii <=
- Re: using libmagic in Emacs?, Stephen J. Turnbull, 2009/08/20
Re: using libmagic in Emacs?, Richard Stallman, 2009/08/20
Re: using libmagic in Emacs?, Stefan Monnier, 2009/08/21
Re: using libmagic in Emacs?, Stephen J. Turnbull, 2009/08/22
Re: using libmagic in Emacs?, Stefan Monnier, 2009/08/22
Re: using libmagic in Emacs?, Stefan Monnier, 2009/08/20
Re: using libmagic in Emacs?, joakim, 2009/08/20
Re: using libmagic in Emacs?, Andreas Schwab, 2009/08/20
Re: using libmagic in Emacs?, joakim, 2009/08/21
Re: using libmagic in Emacs?, Eli Zaretskii, 2009/08/21