From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Vinicius Jose Latorre Newsgroups: gmane.emacs.devel Subject: Re: Image file name extension not recognized Date: Fri, 02 Feb 2007 23:42:32 -0200 Message-ID: <45C3E888.2090302@ig.com.br> References: <45C3DC03.6010000@ig.com.br> <87odoct5mb.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 1170466906 8868 80.91.229.12 (3 Feb 2007 01:41:46 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 3 Feb 2007 01:41:46 +0000 (UTC) Cc: emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Feb 03 02:41:36 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 1HD9uK-0002G5-CK for ged-emacs-devel@m.gmane.org; Sat, 03 Feb 2007 02:41:36 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HD9uK-0008R8-2J for ged-emacs-devel@m.gmane.org; Fri, 02 Feb 2007 20:41:36 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HD9u9-0008R1-V7 for emacs-devel@gnu.org; Fri, 02 Feb 2007 20:41:25 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HD9u3-0008PD-Se for emacs-devel@gnu.org; Fri, 02 Feb 2007 20:41:25 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HD9u3-0008PA-Pz for emacs-devel@gnu.org; Fri, 02 Feb 2007 20:41:19 -0500 Original-Received: from smtpout11.uol.com.br ([200.221.4.202] helo=smtp.uol.com.br) by monty-python.gnu.org with esmtp (Exim 4.52) id 1HD9u3-0003hs-6F for emacs-devel@gnu.org; Fri, 02 Feb 2007 20:41:19 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by socom5.uol.com.br (Postfix) with ESMTP id 7309A4004570; Fri, 2 Feb 2007 23:41:17 -0200 (BRST) Original-Received: from [201.82.35.154] (unknown [201.82.35.154]) by socom5.uol.com.br (Postfix) with ESMTP id DD70240046C4; Fri, 2 Feb 2007 23:41:15 -0200 (BRST) User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.2pre) Gecko/20070111 SeaMonkey/1.1 In-Reply-To: <87odoct5mb.fsf@stupidchicken.com> X-SIG5: a09606e15fe5fd9fca9d5932b7c00288 X-detected-kernel: 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:65805 Archived-At: Chong Yidong wrote: > Vinicius Jose Latorre writes: > > >> I have some image files with names like: >> >> IMG_0366.JPG >> >> When I try to open it, Emacs does not recognize it as an image file. >> >> But if I rename the file to: >> >> IMG_0366.jpg >> >> Then Emacs recognizes the file as an image file. >> >> Shouldn't Emacs recognize files with .JPG extension as an image file? >> > > Jpeg images are supposed to be autodetected using their contents, even > if the file extension is JPG (see image-type-header-regexps). > Apparently, that autodetection is failing in this case. Could you try > to find out why? The image-type-header-regexps variable has the value: '(("\\`/[\t\n\r ]*\\*.*XPM.\\*/" . xpm) ("\\`P[1-6]" . pbm) ("\\`GIF8" . gif) ("\\`\211PNG\r\n" . png) ("\\`[\t\n\r ]*#define" . xbm) ("\\`\\(MM\0\\*\\|II\\*\0\\)" . tiff) ("\\`[\t\n\r ]*%!PS" . postscript) ("\\`\xff\xd8" . (image-jpeg-p . jpeg))) Where image-jpeg-p is a function. I just type M-x debug-on-entry RET image-jpeg-p RET Then tried to open the file again and image-jpeg-p is not called.