From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Mathias Dahl" Newsgroups: gmane.emacs.devel Subject: Re: Image mode Date: Mon, 5 Feb 2007 19:35:02 +0100 Message-ID: <7dbe73ed0702051035r4122401ane2f2a8ca18ef7e51@mail.gmail.com> References: <87k5yxeg19.fsf@jurta.org> <45C70ECD.70208@gmail.com> <45C72724.4000800@gmail.com> <7dbe73ed0702050647y15d4ed7cu381a869cd2e835f3@mail.gmail.com> <87lkjcttv5.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1170700538 20333 80.91.229.12 (5 Feb 2007 18:35:38 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 5 Feb 2007 18:35:38 +0000 (UTC) Cc: Juanma Barranquero , emacs-devel@gnu.org To: "Chong Yidong" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 05 19:35:29 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 1HE8gO-0005vf-Jl for ged-emacs-devel@m.gmane.org; Mon, 05 Feb 2007 19:35:16 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HE8gO-0004BW-4z for ged-emacs-devel@m.gmane.org; Mon, 05 Feb 2007 13:35:16 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HE8gD-0004Az-K0 for emacs-devel@gnu.org; Mon, 05 Feb 2007 13:35:05 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HE8gC-00049Y-2K for emacs-devel@gnu.org; Mon, 05 Feb 2007 13:35:05 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HE8gB-00049T-Ud for emacs-devel@gnu.org; Mon, 05 Feb 2007 13:35:03 -0500 Original-Received: from ug-out-1314.google.com ([66.249.92.169]) by monty-python.gnu.org with esmtp (Exim 4.52) id 1HE8gB-0006p1-Hq for emacs-devel@gnu.org; Mon, 05 Feb 2007 13:35:03 -0500 Original-Received: by ug-out-1314.google.com with SMTP id j3so1547958ugf for ; Mon, 05 Feb 2007 10:35:02 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=TDSMZy+qY92qrEBxUscDrObhtdSGcpIqEllmhL7CmzzKHYvR+Z4Hp297OPAzNFC2UmnjLCHebVY7cdZZk7fpcVAHtLkNOR+zGFFDoNWX3BLZXfqoxqPUJeORronN6KlF1kziquHCq2U6iS9BUKs1wbN0eiOaaghOj7SUBgaRyRk= Original-Received: by 10.78.193.19 with SMTP id q19mr1218317huf.1170700502220; Mon, 05 Feb 2007 10:35:02 -0800 (PST) Original-Received: by 10.78.12.17 with HTTP; Mon, 5 Feb 2007 10:35:02 -0800 (PST) In-Reply-To: <87lkjcttv5.fsf@stupidchicken.com> Content-Disposition: inline X-detected-kernel: Linux 2.4-2.6 (Google crawlbot) 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:65929 Archived-At: > > What happened is that it required more code and no one offered to implement it. > > How about this patch? > > It brings up the prompt when the image autodetection clashes with > auto-mode-alist, and restores the old image-mode behavior for all > other cases. I like it. I took one of my by now infamous .thm files (which is really a JPEG image) and tried to open it with `find-file'. Named with a .thm extension Emacs displayed the image without warning me (I have nothing in my `auto-mode-alist' that matches thm-files). Renamed as "muu.txt" Emacs asked me: The contents of the file muu.txt indicate that it is a jpeg image file. However, it could also be opened in text-mode. Open muu.txt as an image file? (yes or no) yes => displays file as an image no => displays file as text Works for me.