From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: using libmagic in Emacs? Date: Mon, 31 Aug 2009 20:58:54 +0300 Message-ID: <83d46bamqp.fsf@gnu.org> References: <87ocqco7fi.fsf@mail.jurta.org> <87y6pb8lqh.fsf@mail.jurta.org> <87my5qngab.fsf@mail.jurta.org> <87eiquuq7j.fsf@mail.jurta.org> <83vdk69evw.fsf@gnu.org> <874orp58fp.fsf@mail.jurta.org> <83ljl0ae9j.fsf@gnu.org> <877hwk3ryv.fsf@mail.jurta.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1251741673 12037 80.91.229.12 (31 Aug 2009 18:01:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 31 Aug 2009 18:01:13 +0000 (UTC) Cc: joakim@verona.se, emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 31 20:01:05 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MiBBg-0001pM-Ow for ged-emacs-devel@m.gmane.org; Mon, 31 Aug 2009 20:01:05 +0200 Original-Received: from localhost ([127.0.0.1]:57439 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MiBBg-00071g-8n for ged-emacs-devel@m.gmane.org; Mon, 31 Aug 2009 14:01:04 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MiBBb-00070N-2I for emacs-devel@gnu.org; Mon, 31 Aug 2009 14:00:59 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MiBBa-0006zi-4z for emacs-devel@gnu.org; Mon, 31 Aug 2009 14:00:58 -0400 Original-Received: from [199.232.76.173] (port=44512 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MiBBa-0006zZ-1Z for emacs-devel@gnu.org; Mon, 31 Aug 2009 14:00:58 -0400 Original-Received: from mtaout6.012.net.il ([84.95.2.16]:25281) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MiBBZ-0001ME-EF for emacs-devel@gnu.org; Mon, 31 Aug 2009 14:00:57 -0400 Original-Received: from conversion-daemon.i-mtaout6.012.net.il by i-mtaout6.012.net.il (HyperSendmail v2007.08) id <0KP9000005Y8QD00@i-mtaout6.012.net.il> for emacs-devel@gnu.org; Mon, 31 Aug 2009 21:00:56 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.228.144.38]) by i-mtaout6.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0KP9002VJ61JI860@i-mtaout6.012.net.il>; Mon, 31 Aug 2009 21:00:56 +0300 (IDT) In-reply-to: <877hwk3ryv.fsf@mail.jurta.org> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (1203?) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:114917 Archived-At: > From: Juri Linkov > Cc: emacs-devel@gnu.org, joakim@verona.se > Date: Mon, 31 Aug 2009 19:17:52 +0300 > > >> > 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. > > `mailcap-file-default-commands' is not infrastructure. It's one > small feature. A feature is something that stands on its own. I don't think `mailcap-file-default-commands' qualifies, nor would any other function that returns something related to a file's type. A feature would _use_ these to actually do something useful with the file. > >> 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? > > When it returns nil, then default commands are the same as provided > by mailcap for plain text files, i.e. `less', `konqueror', etc. Which is clearly un-graceful in my book.