[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: using libmagic in Emacs?
From: |
Juri Linkov |
Subject: |
Re: using libmagic in Emacs? |
Date: |
Mon, 31 Aug 2009 19:19:59 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu) |
> No one has yet explained why we shouldn't deal with such failures by
> simply fixing Emacs' file detection, instead of relying on libmagic or
> file. Given that libmagic/file isn't always going to be present, and
> there's no intention of removing our file detection code, why not make
> sure the latter works?
Sure, we need to support the existing file detection code for the case
of absent libmagic/file. This means manually copying necessary parts
of the magic database to `magic-fallback-mode-alist',
`image-type-header-regexps', `archive-find-type'.
> Are there any situations we are inherently incapable of detecting,
> and why?
One situation is when the number of formats to copy from the magic
database is too high, e.g. for all ImageMagick formats.
Also the magic database has simple rules for detecting C, Lisp and
Perl programs, but these rules are unreliable.
Another useful case for libmagic/file is getting MIME types and mailcap
commands to run on them as demonstrated by my patch. But it seems this
feature is not too important to justify adding libmagic to Emacs instead
of running `file'.
--
Juri Linkov
http://www.jurta.org/emacs/
- Re: using libmagic in Emacs?, (continued)
- 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
- Re: using libmagic in Emacs?, Richard Stallman, 2009/08/31
- Re: using libmagic in Emacs?, Richard Stallman, 2009/08/30
- Re: using libmagic in Emacs?, Chong Yidong, 2009/08/31
- Re: using libmagic in Emacs?,
Juri Linkov <=
- Re: using libmagic in Emacs?, Stefan Monnier, 2009/08/31
- Re: using libmagic in Emacs?, Eli Zaretskii, 2009/08/31
- Re: using libmagic in Emacs?, Juri Linkov, 2009/08/25
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, 2009/08/20
- Re: using libmagic in Emacs?, Stephen J. Turnbull, 2009/08/20