From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id E61F5431FC0 for ; Wed, 10 Feb 2010 12:20:01 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -1.91 X-Spam-Level: X-Spam-Status: No, score=-1.91 tagged_above=-999 required=5 tests=[ALL_TRUSTED=-1.8, AWL=-0.111, BAYES_50=0.001] autolearn=ham Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nrkIpQp85vPw for ; Wed, 10 Feb 2010 12:20:01 -0800 (PST) Received: from yoom.home.cworth.org (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 4606C431FBD for ; Wed, 10 Feb 2010 12:20:01 -0800 (PST) Received: by yoom.home.cworth.org (Postfix, from userid 1000) id 0122C55011E; Wed, 10 Feb 2010 12:20:00 -0800 (PST) From: Carl Worth To: notmuch@notmuchmail.org Date: Wed, 10 Feb 2010 12:20:00 -0800 Message-ID: <87vde4derz.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Subject: emacs: On getting support for inline images X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Feb 2010 20:20:02 -0000 --=-=-= For a while I've seen that I can very conveniently deal with attachments such as PDF files or even OpenOffice (or PowerPoint) presentations with the notmuch/emacs client. I simply hit 'v' and an external viewer comes up with the attached file. That's all very nice. But strangely, I've also noticed that attached images don't get the same treatment. I investigated a bit and discovered that the images are being rendered within emacs and inside of a temporary buffer that is being used by the function invoked by 'v'. Before this function returns, the temporary buffer including the nicely inline-rendered image is being killed. (And I suspect the exact same thing is happening with encrypted messages where hitting 'v' gets emacs to prompt for the passphrase, but then nothing is displayed to the user.) I was able to get images working by customizing the mm-inline-media-tests variable. I removed the image/png clause from the value, and now when I hit 'v' I get a nice, external image viewer as configured in /etc/mailcap, etc. Here are some ideas for possible (and independent) fixes: 1. With the current setup, we know we are using a temporary buffer that the user won't see, so notmuch could temporarily set mm-inline-media-tests to nil forcing everything to use external viewers when the user presses 'v'. 2. The original presentation of Mime parts could examine mm-inline-media-tests and directly render anything possible within the original presentation of the message. This would allow images to be viewed directly without requiring the user to press 'v'. And the user could configure this existing variable to control what content is displayed inline. 3. We could move away from these various mm- functions for displaying MIME parts and simply add functionality to the notmuch command line for extracting individual MIME parts from messages, (which is something that a non-emacs client will likely want anyway). Then we can use the lower-level functions to display things directly. (For example, displaying an image looks as simple as calling the create-image and put-image functions). Anyway, there's a lot that can be done here to make the presentation much more usable. And of course, I'll always be glad for any help! -Carl --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iD8DBQFLcxTw6JDdNq8qSWgRAsmhAKCoi4ssMkZab/a8xEXo4/M+Oz2jqACfWLKn xmDCDAP/DqKesddAtdRjOkI= =5YlY -----END PGP SIGNATURE----- --=-=-=--