From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Peter Dyballa Newsgroups: gmane.emacs.help Subject: Re: View image types Date: Mon, 6 Mar 2006 12:17:45 +0100 Message-ID: References: <07F4870D-3BB2-409D-BC3F-D11EA5115CF4@Web.DE> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 (Apple Message framework v746.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1141671281 11679 80.91.229.6 (6 Mar 2006 18:54:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 6 Mar 2006 18:54:41 +0000 (UTC) Cc: Help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Mar 06 19:54:33 2006 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1FGKqn-0002qU-00 for ; Mon, 06 Mar 2006 19:54:33 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FGKqx-0006D7-Mz for geh-help-gnu-emacs@m.gmane.org; Mon, 06 Mar 2006 13:54:43 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FGKcm-0007vl-Nr for help-gnu-emacs@gnu.org; Mon, 06 Mar 2006 13:40:04 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FGJyv-0004eC-1s for Help-gnu-emacs@gnu.org; Mon, 06 Mar 2006 12:58:58 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FGJyr-0004Wv-F3 for Help-gnu-emacs@gnu.org; Mon, 06 Mar 2006 12:58:49 -0500 Original-Received: from [217.72.192.242] (helo=fmmailgate04.web.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FGDlA-0000pQ-Gq; Mon, 06 Mar 2006 06:20:16 -0500 Original-Received: by fmmailgate04.web.de (8.12.10/8.12.10/webde Linux 0.7) with ESMTP id k26BHlCT006139; Mon, 6 Mar 2006 12:17:47 +0100 Original-Received: from [87.193.4.142] (helo=[192.168.1.2]) by smtp08.web.de with asmtp (TLSv1:RC4-SHA:128) (WEB.DE 4.106 #94) id 1FGDil-0007dx-00; Mon, 06 Mar 2006 12:17:47 +0100 In-Reply-To: X-Image-Url: http://homepage.mac.com/sparifankal/.cv/thumbs/me.thumbnail Original-To: Eli Zaretskii X-Mailer: Apple Mail (2.746.2) X-Sender: Peter_Dyballa@web.de X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org X-Spam-Report: 5.0 points; * 0.0 BAYES_50 BODY: Bayesian spam probability is 50 to 56% * [score: 0.5000] * 5.0 RCVD_IN_BL_SPAMCOP_NET RBL: Received via a relay in bl.spamcop.net * [Blocked - see ] Xref: news.gmane.org gmane.emacs.help:33556 Archived-At: Am 06.03.2006 um 05:32 schrieb Eli Zaretskii: >> >> When I press v on an XPM, XBM, or PS file I don't see the picture, >> only the file's internal code. For PNG, GIF, TIFF, JPEG, or PBM >> formats I see the picture and no code at all. > > Did you turn on the auto-image-file-mode? If not, what you see is > expected behavior. > That's it! Thank you! image-file-name-extensions is the variable that names all the file types by file name extension to display them. PostScript does not belong to this list, and when added I still see only the PS code. I'll investigate this some other day ... One item close to a bug exists: valid JPEG2000 files are not displayed! Neither when I add jp2 to image-file-name-extensions nor when I hard link a JP2 file to a JPG file, I only get: create-image: Cannot determine image type It looks as if image-type-header-regexps, whose default value seems to be '(("\\`/[\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))) needs to be extended with a representation of this magic entry: 0 string \x00\x00\x00\x0C\x6A\x50\x20\x20\x0D\x0A\x87\x0A JPEG 2000 image data The JP2 buffer starts with ^@^@^@^LjP ^M^J\207^J so an expression like ("\\`\0\0\0\14jP " . (image-jpeg-p . jpeg)) might already do the job ... -- Greetings Pete A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools.