Re: Applying patches directly from emails?
[notmuch-archives.git] / 54 / c8c50620407d3fcab40dce689bd3b23f2bea8c
1 Return-Path: <alex.boterolowry@gmail.com>\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 37C55431FC0\r
6         for <notmuch@notmuchmail.org>; Wed, 10 Feb 2010 13:52:46 -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: -0.214\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.214 tagged_above=-999 required=5\r
12         tests=[AWL=-0.216, BAYES_50=0.001, UNPARSEABLE_RELAY=0.001]\r
13         autolearn=ham\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id 7sFeNslDMB1k for <notmuch@notmuchmail.org>;\r
17         Wed, 10 Feb 2010 13:52:45 -0800 (PST)\r
18 Received: from mail-fx0-f217.google.com (mail-fx0-f217.google.com\r
19         [209.85.220.217])\r
20         by olra.theworths.org (Postfix) with ESMTP id ED00D431FAE\r
21         for <notmuch@notmuchmail.org>; Wed, 10 Feb 2010 13:52:44 -0800 (PST)\r
22 Received: by fxm9 with SMTP id 9so201100fxm.30\r
23         for <notmuch@notmuchmail.org>; Wed, 10 Feb 2010 13:52:44 -0800 (PST)\r
24 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
25         h=domainkey-signature:received:received:received:from:to:subject\r
26         :in-reply-to:references:date:message-id:mime-version:content-type;\r
27         bh=btqoCGxU4TG6k1GmCWEpzsTq7T/8z8LLnV+EoLEu3k0=;\r
28         b=G9w5pg6zU1JRLHJPvr2Aqd6cGIAs/2Y36y+8z/Re3P8I0INNa758jAopSfvzUtany9\r
29         mtkDL0texCKs3dCw0JhJTwUUiGhdmGJKY5iI1ZSbG3/C3cTEvhUXglLYnNbk73iM4xfb\r
30         nQG3/r7JkgBRNzXr8ypFaaDiNSE4OmEuJU7WU=\r
31 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;\r
32         h=from:to:subject:in-reply-to:references:date:message-id:mime-version\r
33         :content-type;\r
34         b=dYNekHUztwFvqKiWkGDH8ceKY0SiU6JNphaNOTvMk6ADf98Rqf8CYRRmrWQU/AXCrq\r
35         3ChKgaK13DS9wH02zeIr4JRbkgRDa04asJX6gVuPvqwKDKL1FEAqV+5OXrLs64d/VCNT\r
36         RbF9f3hEPmSY8Gg39xIubvf6+zc4KNxZFokaI=\r
37 Received: by 10.87.69.17 with SMTP id w17mr4155170fgk.41.1265838763931;\r
38         Wed, 10 Feb 2010 13:52:43 -0800 (PST)\r
39 Received: from fortitudo (nat09.metaweb.com [208.68.111.136])\r
40         by mx.google.com with ESMTPS id 16sm846399fxm.0.2010.02.10.13.52.38\r
41         (version=TLSv1/SSLv3 cipher=RC4-MD5);\r
42         Wed, 10 Feb 2010 13:52:40 -0800 (PST)\r
43 Received: from alexbl (uid 1001) (envelope-from\r
44         alexbl@fortitudo.i-did-not-set--mail-host-address--so-tickle-me)\r
45         id a095 by fortitudo (DragonFly Mail Agent)\r
46         Wed, 10 Feb 2010 13:53:53 -0800\r
47 From: Alexander Botero-Lowry <alex.boterolowry@gmail.com>\r
48 To: Carl Worth <cworth@cworth.org>, notmuch@notmuchmail.org\r
49 In-Reply-To: <87vde4derz.fsf@yoom.home.cworth.org>\r
50 References: <87vde4derz.fsf@yoom.home.cworth.org>\r
51 Date: Wed, 10 Feb 2010 13:53:52 -0800\r
52 Message-ID:\r
53  <866364g3kf.fsf@fortitudo.i-did-not-set--mail-host-address--so-tickle-me>\r
54 MIME-Version: 1.0\r
55 Content-Type: text/plain; charset=us-ascii\r
56 Subject: Re: [notmuch] emacs: On getting support for inline images\r
57 X-BeenThere: notmuch@notmuchmail.org\r
58 X-Mailman-Version: 2.1.13\r
59 Precedence: list\r
60 List-Id: "Use and development of the notmuch mail system."\r
61         <notmuch.notmuchmail.org>\r
62 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
63         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
64 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
65 List-Post: <mailto:notmuch@notmuchmail.org>\r
66 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
67 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
68         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
69 X-List-Received-Date: Wed, 10 Feb 2010 21:52:46 -0000\r
70 \r
71 On Wed, 10 Feb 2010 12:20:00 -0800, Carl Worth <cworth@cworth.org> wrote:\r
72 > For a while I've seen that I can very conveniently deal with attachments\r
73 > such as PDF files or even OpenOffice (or PowerPoint) presentations with\r
74 > the notmuch/emacs client. I simply hit 'v' and an external viewer comes\r
75 > up with the attached file. That's all very nice.\r
76\r
77 Yeah, though it would b enice if we had more fine-grained control over\r
78 it, like allowing you to save a file regardless of mm-* thinks it should\r
79 get to display it or not.\r
80 \r
81 > Here are some ideas for possible (and independent) fixes:\r
82\r
83 > 1. With the current setup, we know we are using a temporary buffer that\r
84 >    the user won't see, so notmuch could temporarily set\r
85 >    mm-inline-media-tests to nil forcing everything to use external\r
86 >    viewers when the user presses 'v'.\r
87\r
88 I think this is a crappy, but perfectly fine temporary fix. \r
89 \r
90 > 2. The original presentation of Mime parts could examine\r
91 >    mm-inline-media-tests and directly render anything possible within\r
92 >    the original presentation of the message. This would allow images to\r
93 >    be viewed directly without requiring the user to press 'v'. And the\r
94 >    user could configure this existing variable to control what content\r
95 >    is displayed inline.\r
96 >\r
97 Yes, I think some kind of mapping of interesting parts in the message to\r
98 the mm-dissect-buffer parts and extending the text/html only inliner to\r
99 also inline those interesting parts is the right thing (tm).\r
100 \r
101 Which points out a huge issue in my current inlining code, the parts\r
102 aren't actually mapped, we're basically counting on the coincidence that\r
103 the parts are in the correct place when we do the inlining, and that\r
104 seems to basically work. That being said, it's the cause of some\r
105 messages occasionally giving you a save dialog, or failing to be parsed\r
106 correctly.\r
107  \r
108 > 3. We could move away from these various mm- functions for displaying\r
109 >    MIME parts and simply add functionality to the notmuch command line\r
110 >    for extracting individual MIME parts from messages, (which is\r
111 >    something that a non-emacs client will likely want anyway). Then we\r
112 >    can use the lower-level functions to display things directly. (For\r
113 >    example, displaying an image looks as simple as calling the\r
114 >    create-image and put-image functions).\r
115 >\r
116 Just talking about this on IRC. I think this is the wrong approach but\r
117 with some right bits. notmuch cli needs to support saving\r
118 parts. Period. but mm-* is a very complex and magical library happily\r
119 used by (almost?) all the emacs mailers. It does a nice job once you\r
120 learn how to wield its magic correctly (and indeed, one of our bigger\r
121 problems is the thread-view is something it wasn't really designed for,\r
122 so we just need to figure out the best-practice for working around\r
123 that).\r
124 \r
125 mm-* should continue to be used, and we need to figure out the right\r
126 technique for mapping between parts mentioned in the output of notmuch\r
127 show and the actual parts in the mm-dissect-buffer output.\r
128  \r
129 I want to work on this, but I've been kind of busy and not felt like\r
130 hacking elisp lately, so hopefilly that'll turn around :/\r
131 \r
132 alex\r