[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: using libmagic in Emacs?
From: |
Miles Bader |
Subject: |
Re: using libmagic in Emacs? |
Date: |
Tue, 25 Aug 2009 11:19:37 +0900 |
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.
-Miles
--
自らを空にして、心を開く時、道は開かれる
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 <=
- Re: using libmagic in Emacs?, joakim, 2009/08/25
- 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