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: Image mode Date: Thu, 08 Feb 2007 13:36:19 -0500 Message-ID: <87tzxw1opo.fsf@stupidchicken.com> References: <87k5yxeg19.fsf@jurta.org> <873b5h4vv7.fsf@stupidchicken.com> <39521.128.165.123.18.1170877435.squirrel@webmail.lanl.gov> <45CAEE65.9050306@gnu.org> <40908.128.165.123.18.1170953705.squirrel@webmail.lanl.gov> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1170959826 8562 80.91.229.12 (8 Feb 2007 18:37:06 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 8 Feb 2007 18:37:06 +0000 (UTC) Cc: emacs-devel@gnu.org, Stefan Monnier , Jason Rumney To: herring@lanl.gov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 08 19:36:58 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 1HFE8c-0005Ca-G3 for ged-emacs-devel@m.gmane.org; Thu, 08 Feb 2007 19:36:54 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HFE8c-00022b-0N for ged-emacs-devel@m.gmane.org; Thu, 08 Feb 2007 13:36:54 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HFE8P-00022V-4q for emacs-devel@gnu.org; Thu, 08 Feb 2007 13:36:41 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HFE8N-00022N-SH for emacs-devel@gnu.org; Thu, 08 Feb 2007 13:36:39 -0500 Original-Received: from south-station-annex.mit.edu ([18.72.1.2]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1HFE8N-0000Xl-Hs; Thu, 08 Feb 2007 13:36:39 -0500 Original-Received: from grand-central-station.mit.edu (GRAND-CENTRAL-STATION.MIT.EDU [18.7.21.82]) by south-station-annex.mit.edu (8.13.6/8.9.2) with ESMTP id l18IacSH009613; Thu, 8 Feb 2007 13:36:38 -0500 (EST) Original-Received: from outgoing-legacy.mit.edu (OUTGOING-LEGACY.MIT.EDU [18.7.22.104]) by grand-central-station.mit.edu (8.13.6/8.9.2) with ESMTP id l18IaPk4018911; Thu, 8 Feb 2007 13:36:27 -0500 (EST) Original-Received: from localhost (MAIN-TWELVE-SIXTY-THREE.MIT.EDU [18.19.5.63]) ) by outgoing-legacy.mit.edu (8.13.6/8.12.4) with ESMTP id l18IaOjg002801; Thu, 8 Feb 2007 13:36:24 -0500 (EST) Original-Received: from cyd by localhost with local (Exim 3.36 #1 (Debian)) id 1HFE84-0001OM-00; Thu, 08 Feb 2007 13:36:20 -0500 In-Reply-To: <40908.128.165.123.18.1170953705.squirrel@webmail.lanl.gov> (Stuart D. Herring's message of "Thu\, 8 Feb 2007 08\:55\:05 -0800 \(PST\)") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.93 (gnu/linux) X-Scanned-By: MIMEDefang 2.42 X-Spam-Score: -2.599 X-detected-kernel: Solaris 9.1 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:66128 Archived-At: "Stuart D. Herring" writes: > `image-mode' isn't on `magic-mode-alist'; `image-mode-maybe' is, and > although perhaps Stefan's stance of nixing it entirely is best, it seems > to me that the -maybe function belongs there. Visiting foo.bar with a > JPEG header in it ought to load Image Minor Mode, provide the C-c C-c > message, and leave the buffer in Fundamental Mode, just as visiting foo.c > with the same contents should load, provide, and leave in C mode. Let's not go around in circles. To re-iterate, the patch is meant to deal with the following issues raised in this thread: 1. Several people have opinioned, sometimes vehemently, that when you open a file whose filename indicates that it is (e.g.) a text file, Emacs should never treat it as an image, even if its contents *look* like an image. So this patch discards image autodetection results when there is a non-image mode match in auto-mode-alist. The only practical situation where image-minor-mode is useful are text-based images like xpm and xbm, and it has already been pointed out that autodetection (as opposed to filename detection) is useless for these since their contents match generic C header files. So image-minor-mode should NOT be coupled with image autodetection. 2. That RMS wants .JPG files to be opened in image-mode through autodetection, rather than turning auto-mode-case-fold on by default.