[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Magic MIME

From: Juri Linkov
Subject: Re: Magic MIME
Date: Mon, 11 Feb 2008 22:59:38 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

>> Are there any obstacles to using magic-mime to determine the file
>> type in Emacs?  If linking libmagic is not possible, then maybe
>> we could parse the magic.mime file, and even run the `file'
>> command directly on a visited file?
> Whatever the decision is, please avoid relying in external commands
> that are not available on all supported platforms.  `file' isn't.

Emacs could follow the principle of graceful degradation here: if there
is no necessary external command or mime database on the system, then
it will provide less reliable result that will be no worse than the
current without using the magic.mime based file type recognition.

> Emacs should be powerful enough to be able to visit files without
> requiring an external tool; if it needs to consult some database for
> that, it should be easy enough to include such a data base in the
> Emacs distribution, perhaps even in a form that is convenient for
> reading in Lisp.

This is one option  However, I'm not sure if licence conditions of the
mime-magic database allow including it to Emacs.

Juri Linkov

reply via email to

[Prev in Thread] Current Thread [Next in Thread]