From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stephen J. Turnbull" Newsgroups: gmane.emacs.devel Subject: Re: using libmagic in Emacs? Date: Fri, 21 Aug 2009 09:19:48 +0900 Message-ID: <87zl9u3tnf.fsf@uwakimon.sk.tsukuba.ac.jp> References: <87hbw35mar.fsf@uwakimon.sk.tsukuba.ac.jp> <83zl9vgovc.fsf@gnu.org> <87bpmb5bsq.fsf@uwakimon.sk.tsukuba.ac.jp> <83y6pegxeq.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 1250813480 6226 80.91.229.12 (21 Aug 2009 00:11:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 21 Aug 2009 00:11:20 +0000 (UTC) Cc: monnier@IRO.UMontreal.CA, joakim@verona.se, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 21 02:11:12 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 1MeHio-0002cE-RU for ged-emacs-devel@m.gmane.org; Fri, 21 Aug 2009 02:11:11 +0200 Original-Received: from localhost ([127.0.0.1]:35255 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MeHin-0006wx-UW for ged-emacs-devel@m.gmane.org; Thu, 20 Aug 2009 20:11:10 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MeHhh-0005Lm-Ph for emacs-devel@gnu.org; Thu, 20 Aug 2009 20:10:01 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MeHhd-0005ID-P5 for emacs-devel@gnu.org; Thu, 20 Aug 2009 20:10:01 -0400 Original-Received: from [199.232.76.173] (port=48445 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MeHhd-0005I1-KK for emacs-devel@gnu.org; Thu, 20 Aug 2009 20:09:57 -0400 Original-Received: from mtps01.sk.tsukuba.ac.jp ([130.158.97.223]:49334) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MeHhZ-0005Sx-SE; Thu, 20 Aug 2009 20:09:54 -0400 Original-Received: from uwakimon.sk.tsukuba.ac.jp (uwakimon.sk.tsukuba.ac.jp [130.158.99.156]) by mtps01.sk.tsukuba.ac.jp (Postfix) with ESMTP id 8D7761535A8; Fri, 21 Aug 2009 09:09:51 +0900 (JST) Original-Received: by uwakimon.sk.tsukuba.ac.jp (Postfix, from userid 1000) id 8EDE0138F9A; Fri, 21 Aug 2009 09:19:48 +0900 (JST) In-Reply-To: <83y6pegxeq.fsf@gnu.org> X-Mailer: VM 8.0.12-devo-585 under 21.5 (beta29) "garbanzo" 891381effa11+ XEmacs Lucid (x86_64-unknown-linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) 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:114468 Archived-At: Eli Zaretskii writes: > Maybe so, but still "man file" shows this at the very first line: > > file - determine file type Sure. file does more than invoke libmagic, though, and in the Unix context the ambiguous "type" is not so problematic; it is basically defined by "what file(1) does." For the broader audience, if "magic" is unacceptable, they probably don't know what file(1) does. > But if this function will fall back on something else if libmagic is > not available, then I think this name is not a good one. This function should be available in a form which only uses libmagic. What other tests should be done should be done in LISP, and I see no reason to hide the libmagic functionality in an "-internal" or otherwise "not for regular use" form.