From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Magic MIME Date: Mon, 11 Feb 2008 22:25:32 -0500 Message-ID: References: <87prv4h032.fsf@jurta.org> <87ve4vfc1m.fsf@jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1202786750 23070 80.91.229.12 (12 Feb 2008 03:25:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 12 Feb 2008 03:25:50 +0000 (UTC) Cc: emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 12 04:26:13 2008 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 1JOlmc-0001oi-Om for ged-emacs-devel@m.gmane.org; Tue, 12 Feb 2008 04:26:11 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JOlm9-0000lr-7V for ged-emacs-devel@m.gmane.org; Mon, 11 Feb 2008 22:25:41 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JOlm5-0000lS-7m for emacs-devel@gnu.org; Mon, 11 Feb 2008 22:25:37 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JOlm2-0000lF-O8 for emacs-devel@gnu.org; Mon, 11 Feb 2008 22:25:35 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JOlm2-0000lC-IL for emacs-devel@gnu.org; Mon, 11 Feb 2008 22:25:34 -0500 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JOlm2-0002mD-BC for emacs-devel@gnu.org; Mon, 11 Feb 2008 22:25:34 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8CAOOfsEdMCpK7/2dsb2JhbACrEHs X-IronPort-AV: E=Sophos;i="4.25,336,1199682000"; d="scan'208";a="14329729" Original-Received: from smtp.pppoe.ca ([65.39.196.238]) by ironport2-out.pppoe.ca with ESMTP; 11 Feb 2008 22:25:33 -0500 Original-Received: from pastel.home ([76.10.146.187]) by smtp.pppoe.ca (Internet Mail Server v1.0) with ESMTP id SFL20333; Mon, 11 Feb 2008 22:25:33 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id A71D07FD8; Mon, 11 Feb 2008 22:25:32 -0500 (EST) In-Reply-To: <87ve4vfc1m.fsf@jurta.org> (Juri Linkov's message of "Mon, 11 Feb 2008 22:55:33 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. 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:88821 Archived-At: > Yes, I remember what a mess was the recognition of image files. But I think > that for other binary formats this could by simplified. If, say, a file > doesn't start with the "0x8080ffff 0x0000081a" signature there is no sense > to try treating it as an arc archive even if it has the .arc extension. Agreed. But just because a file starts with "0x8080ffff 0x0000081a" shouldn't be enough of a reason to treat it as an arc archive: we need to look at the filename as well. > IIRC, the decision for the image file extensions taking precedence over > the image file content was based solely on the security holes that some > image libraries reportedly have. I don't think so. I do remember that it was decided not to introduce the two-sided (file-name and file-contents) method so close to the release. So now would be a better time. We could associate "\\.arc\\'" with '(lisp-arc-mode archive-mode) and associate "0x8080ffff 0x0000081a" to archive-mode (and some other pseudo-magic thingy for Arc-the-language). Stefan