emacs-devel
[Top][All Lists]
Advanced

[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: Mon, 31 Aug 2009 05:49:44 +0300

> From: Juri Linkov <address@hidden>
> Cc: address@hidden,  address@hidden
> Date: Sun, 30 Aug 2009 23:54:34 +0300
> 
> >> I agree that running `file' is a simpler solution.
> >
> > PLEASE do not base Emacs infrastructure on external programs, unless
> > they come with Emacs.
> 
> There are many features in Emacs that depend on external programs,
> e.g. `ls' for dired, `find' and `grep', `man', `ispell', `shell',
> `gdb', `diff', VCS tools, etc.

I said infrastructure, not features.  Of those you mentioned only `ls'
is used in infrastructure, and that's precisely why we had to write
ls-lisp.el.

> > `file' is not available on every platform, and even on those it is,
> 
> When `libmagic' is available, then usually `file' is available as well
> on the same platform.

No.  libmagic can be bundled and compiled with Emacs.  `file' needs to
be present.

> > In any case, invoking external programs without being smart about
> > their non-existence is not something we should have in Emacs.
> 
> My patch fails gracefully when `file' is not available, I tried
> removing `file' without any problem.  The function just returns nil.

And that is graceful how?




reply via email to

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