From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: using libmagic in Emacs? Date: Mon, 31 Aug 2009 11:03:48 -0400 Message-ID: <87tyzovxd7.fsf@stupidchicken.com> 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> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1251733967 18282 80.91.229.12 (31 Aug 2009 15:52:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 31 Aug 2009 15:52:47 +0000 (UTC) Cc: juri@jurta.org, Eli Zaretskii , joakim@verona.se, emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 31 17:52:39 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 1Mi9BO-0002ii-LO for ged-emacs-devel@m.gmane.org; Mon, 31 Aug 2009 17:52:38 +0200 Original-Received: from localhost ([127.0.0.1]:46038 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mi9BO-0007Gm-2W for ged-emacs-devel@m.gmane.org; Mon, 31 Aug 2009 11:52:38 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mi8QP-0007nj-B1 for emacs-devel@gnu.org; Mon, 31 Aug 2009 11:04:05 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mi8QJ-0007gj-Qe for emacs-devel@gnu.org; Mon, 31 Aug 2009 11:04:04 -0400 Original-Received: from [199.232.76.173] (port=44641 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mi8QI-0007gT-NK for emacs-devel@gnu.org; Mon, 31 Aug 2009 11:03:58 -0400 Original-Received: from pantheon-po44.its.yale.edu ([130.132.50.78]:42867) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Mi8QA-0004iM-Uc; Mon, 31 Aug 2009 11:03:51 -0400 Original-Received: from furry (dhcp128036014244.central.yale.edu [128.36.14.244]) (authenticated bits=0) by pantheon-po44.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id n7VF3mOa014987 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 31 Aug 2009 11:03:48 -0400 Original-Received: by furry (Postfix, from userid 1000) id B8529C070; Mon, 31 Aug 2009 11:03:48 -0400 (EDT) In-Reply-To: (Richard Stallman's message of "Sun, 30 Aug 2009 23:33:05 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.4-2.6 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:114901 Archived-At: Richard Stallman writes: > PLEASE do not base Emacs infrastructure on external programs, unless > they come with Emacs. `file' is not available on every platform, and > > libmagic isn't either. > > even on those it is, the quality and extent of its database is unclear > and so cannot be relied upon. > > On systems that have libmagic, isn't it the case that file uses libmagic? > > I really don't understand why linking against a simple free library is > an issue, but if it is, we should find a different solution using some > database internal to Emacs, as we did until now. > > It shouldn't be a big deal. Only a few specialized places should want > to run `file' on a file. 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? Are there any situations we are inherently incapable of detecting, and why?