RE: [Spam-verdenking][english 100%] Re: another bug fix release: 0.15.2, in progress.
[notmuch-archives.git] / 49 / ca246463a4ae5c71efad4c94ff82cdea577374
1 Return-Path: <cworth@cworth.org>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id E61F5431FC0\r
6         for <notmuch@notmuchmail.org>; Wed, 10 Feb 2010 12:20:01 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -1.91\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-1.91 tagged_above=-999 required=5\r
12         tests=[ALL_TRUSTED=-1.8, AWL=-0.111, BAYES_50=0.001] autolearn=ham\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id nrkIpQp85vPw for <notmuch@notmuchmail.org>;\r
16         Wed, 10 Feb 2010 12:20:01 -0800 (PST)\r
17 Received: from yoom.home.cworth.org (localhost [127.0.0.1])\r
18         by olra.theworths.org (Postfix) with ESMTP id 4606C431FBD\r
19         for <notmuch@notmuchmail.org>; Wed, 10 Feb 2010 12:20:01 -0800 (PST)\r
20 Received: by yoom.home.cworth.org (Postfix, from userid 1000)\r
21         id 0122C55011E; Wed, 10 Feb 2010 12:20:00 -0800 (PST)\r
22 From: Carl Worth <cworth@cworth.org>\r
23 To: notmuch@notmuchmail.org\r
24 Date: Wed, 10 Feb 2010 12:20:00 -0800\r
25 Message-ID: <87vde4derz.fsf@yoom.home.cworth.org>\r
26 MIME-Version: 1.0\r
27 Content-Type: multipart/signed; boundary="=-=-=";\r
28         micalg=pgp-sha1; protocol="application/pgp-signature"\r
29 Subject: [notmuch] emacs: On getting support for inline images\r
30 X-BeenThere: notmuch@notmuchmail.org\r
31 X-Mailman-Version: 2.1.13\r
32 Precedence: list\r
33 List-Id: "Use and development of the notmuch mail system."\r
34         <notmuch.notmuchmail.org>\r
35 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
36         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
37 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
38 List-Post: <mailto:notmuch@notmuchmail.org>\r
39 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
40 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
41         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
42 X-List-Received-Date: Wed, 10 Feb 2010 20:20:02 -0000\r
43 \r
44 --=-=-=\r
45 \r
46 For a while I've seen that I can very conveniently deal with attachments\r
47 such as PDF files or even OpenOffice (or PowerPoint) presentations with\r
48 the notmuch/emacs client. I simply hit 'v' and an external viewer comes\r
49 up with the attached file. That's all very nice.\r
50 \r
51 But strangely, I've also noticed that attached images don't get the same\r
52 treatment.\r
53 \r
54 I investigated a bit and discovered that the images are being rendered\r
55 within emacs and inside of a temporary buffer that is being used by the\r
56 function invoked by 'v'. Before this function returns, the temporary\r
57 buffer including the nicely inline-rendered image is being killed. (And\r
58 I suspect the exact same thing is happening with encrypted messages\r
59 where hitting 'v' gets emacs to prompt for the passphrase, but then\r
60 nothing is displayed to the user.)\r
61 \r
62 I was able to get images working by customizing the\r
63 mm-inline-media-tests variable. I removed the image/png clause from the\r
64 value, and now when I hit 'v' I get a nice, external image viewer as\r
65 configured in /etc/mailcap, etc.\r
66 \r
67 Here are some ideas for possible (and independent) fixes:\r
68 \r
69 1. With the current setup, we know we are using a temporary buffer that\r
70    the user won't see, so notmuch could temporarily set\r
71    mm-inline-media-tests to nil forcing everything to use external\r
72    viewers when the user presses 'v'.\r
73 \r
74 2. The original presentation of Mime parts could examine\r
75    mm-inline-media-tests and directly render anything possible within\r
76    the original presentation of the message. This would allow images to\r
77    be viewed directly without requiring the user to press 'v'. And the\r
78    user could configure this existing variable to control what content\r
79    is displayed inline.\r
80 \r
81 3. We could move away from these various mm- functions for displaying\r
82    MIME parts and simply add functionality to the notmuch command line\r
83    for extracting individual MIME parts from messages, (which is\r
84    something that a non-emacs client will likely want anyway). Then we\r
85    can use the lower-level functions to display things directly. (For\r
86    example, displaying an image looks as simple as calling the\r
87    create-image and put-image functions).\r
88 \r
89 Anyway, there's a lot that can be done here to make the presentation\r
90 much more usable. And of course, I'll always be glad for any help!\r
91 \r
92 -Carl\r
93 \r
94 --=-=-=\r
95 Content-Type: application/pgp-signature\r
96 \r
97 -----BEGIN PGP SIGNATURE-----\r
98 Version: GnuPG v1.4.10 (GNU/Linux)\r
99 \r
100 iD8DBQFLcxTw6JDdNq8qSWgRAsmhAKCoi4ssMkZab/a8xEXo4/M+Oz2jqACfWLKn\r
101 xmDCDAP/DqKesddAtdRjOkI=\r
102 =5YlY\r
103 -----END PGP SIGNATURE-----\r
104 --=-=-=--\r