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: Image mode Date: Mon, 05 Feb 2007 14:28:10 -0500 Message-ID: References: <87k5yxeg19.fsf@jurta.org> <87abzsl8x4.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1170703727 11194 80.91.229.12 (5 Feb 2007 19:28:47 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 5 Feb 2007 19:28:47 +0000 (UTC) Cc: Juri Linkov , emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 05 20:28:39 2007 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 1HE9W1-0005XN-Jc for ged-emacs-devel@m.gmane.org; Mon, 05 Feb 2007 20:28:37 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HE9W1-00079E-1E for ged-emacs-devel@m.gmane.org; Mon, 05 Feb 2007 14:28:37 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HE9Vq-000797-Le for emacs-devel@gnu.org; Mon, 05 Feb 2007 14:28:26 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HE9Vo-00078u-E9 for emacs-devel@gnu.org; Mon, 05 Feb 2007 14:28:25 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HE9Vo-00078r-9y for emacs-devel@gnu.org; Mon, 05 Feb 2007 14:28:24 -0500 Original-Received: from mercure.iro.umontreal.ca ([132.204.24.67]) by monty-python.gnu.org with esmtp (Exim 4.52) id 1HE9Vn-0000lG-Vw for emacs-devel@gnu.org; Mon, 05 Feb 2007 14:28:24 -0500 Original-Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id 9C9052CEFF9; Mon, 5 Feb 2007 14:28:23 -0500 (EST) Original-Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id B7C413FE0; Mon, 5 Feb 2007 14:28:10 -0500 (EST) Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 9F87E4C6D25; Mon, 5 Feb 2007 14:28:10 -0500 (EST) In-Reply-To: <87abzsl8x4.fsf@stupidchicken.com> (Chong Yidong's message of "Mon\, 05 Feb 2007 14\:08\:07 -0500") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.92 (gnu/linux) X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-2.82, requis 5, autolearn=not spam, ALL_TRUSTED -2.82) X-DIRO-MailScanner-From: monnier@iro.umontreal.ca X-detected-kernel: Linux 2.6 (newer, 3) 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:65944 Archived-At: >> Note that I know of no other application which uses such >> content-detection to discover whether a file is an image or >> something else. > Gimp does it. Rename a file foo.jpg to foo.c and it will still > display the image. Please re-read what I wrote. GIMP uses the file contents to discover *which* image it's dealing with, but it's not using it to discover whether it's an image or not. It's quite different: I believe there is pretty much no known overlap between the various image formats used today, so you can decide which image format it is unambiguously based on the contents. But in Emacs if we use content-based detection we have to be ready to deal with an ambiguity with any other file format, that a whole other ball game. Stefan