[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: using libmagic in Emacs?
From: |
joakim |
Subject: |
Re: using libmagic in Emacs? |
Date: |
Tue, 25 Aug 2009 07:09:03 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) |
Miles Bader <address@hidden> writes:
> Richard Stallman <address@hidden> writes:
>> If some other Lisp code is interested in the mime type of a file,
>> there is a much easier way to find it out: run `file'.
>
> Well, not entirely trivial of course, since Emacs then needs to
> interpret the results from the file command.
>
>> To complicate Emacs with another library just to make that operation
>> a little faster is a step in the wrong direction.
>
> I wonder how hard it would be to have some elisp that understands the
> "magic" rules that the file command uses... at first glance, they don't
> seem particularly complex; e.g., this is the first entry from
> "/usr/share/file/magic":
>
> 0 lelong 0xc3cbc6c5 RISC OS Chunk data
> >12 string OBJ_ \b, AOF object
> >12 string LIB_ \b, ALF library
>
> If there was such elisp code, Emacs could use any magic rules file on
> the system, and in addition, could distribute it's own (perhaps smaller)
> set.
I agree that the main benefit of using libmagic is getting access to the
libmagic database.
> -Miles
--
Joakim Verona
- Re: Bidi support, (continued)
- Re: using libmagic in Emacs?, Juri Linkov, 2009/08/18
- Re: using libmagic in Emacs?, Richard Stallman, 2009/08/19
- Re: using libmagic in Emacs?, Juri Linkov, 2009/08/22
- Re: using libmagic in Emacs?, Richard Stallman, 2009/08/23
- Re: using libmagic in Emacs?, Juri Linkov, 2009/08/23
- Re: using libmagic in Emacs?, joakim, 2009/08/24
- Re: using libmagic in Emacs?, Richard Stallman, 2009/08/24
- Re: using libmagic in Emacs?, Miles Bader, 2009/08/24
- Re: using libmagic in Emacs?,
joakim <=
- Re: using libmagic in Emacs?, James Cloos, 2009/08/25
- Re: using libmagic in Emacs?, Thien-Thi Nguyen, 2009/08/25
- Re: using libmagic in Emacs?, Stefan Monnier, 2009/08/25
- Re: using libmagic in Emacs?, Juri Linkov, 2009/08/25
- Re: using libmagic in Emacs?, Juri Linkov, 2009/08/29
- Re: using libmagic in Emacs?, Eli Zaretskii, 2009/08/29
- Re: using libmagic in Emacs?, Juri Linkov, 2009/08/30
- Re: using libmagic in Emacs?, Eli Zaretskii, 2009/08/30
- Re: using libmagic in Emacs?, Juri Linkov, 2009/08/31
- Re: using libmagic in Emacs?, Eli Zaretskii, 2009/08/31