1 Return-Path: <amthrax@drake.mit.edu>
\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 594CC429E35
\r
6 for <notmuch@notmuchmail.org>; Sun, 4 Dec 2011 11:31:57 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\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 oY2AxG2LddGf for <notmuch@notmuchmail.org>;
\r
16 Sun, 4 Dec 2011 11:31:56 -0800 (PST)
\r
17 Received: from dmz-mailsec-scanner-1.mit.edu (DMZ-MAILSEC-SCANNER-1.MIT.EDU
\r
19 by olra.theworths.org (Postfix) with ESMTP id CCE91429E26
\r
20 for <notmuch@notmuchmail.org>; Sun, 4 Dec 2011 11:31:53 -0800 (PST)
\r
21 X-AuditID: 1209190c-b7f806d0000008d6-59-4edbcaa97985
\r
22 Received: from mailhub-auth-1.mit.edu ( [18.9.21.35])
\r
23 by dmz-mailsec-scanner-1.mit.edu (Symantec Messaging Gateway) with SMTP
\r
24 id 47.BE.02262.9AACBDE4; Sun, 4 Dec 2011 14:31:53 -0500 (EST)
\r
25 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])
\r
26 by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id pB4JVrd7006821;
\r
27 Sun, 4 Dec 2011 14:31:53 -0500
\r
28 Received: from drake.mit.edu
\r
29 (209-6-116-242.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com
\r
30 [209.6.116.242]) (authenticated bits=0)
\r
31 (User authenticated as amdragon@ATHENA.MIT.EDU)
\r
32 by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id pB4JVp2N029477
\r
33 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);
\r
34 Sun, 4 Dec 2011 14:31:52 -0500 (EST)
\r
35 Received: from amthrax by drake.mit.edu with local (Exim 4.76)
\r
36 (envelope-from <amthrax@drake.mit.edu>)
\r
37 id 1RXHmx-0002iw-Oc; Sun, 04 Dec 2011 14:31:51 -0500
\r
38 From: Austin Clements <amdragon@MIT.EDU>
\r
39 To: notmuch@notmuchmail.org
\r
40 Subject: [PATCH 1/4] show: Pass notmuch_message_t instead of path to
\r
42 Date: Sun, 4 Dec 2011 14:31:37 -0500
\r
43 Message-Id: <1323027100-10307-2-git-send-email-amdragon@mit.edu>
\r
44 X-Mailer: git-send-email 1.7.5.4
\r
45 In-Reply-To: <1323027100-10307-1-git-send-email-amdragon@mit.edu>
\r
46 References: <1322446871-14986-1-git-send-email-amdragon@mit.edu>
\r
47 <1323027100-10307-1-git-send-email-amdragon@mit.edu>
\r
48 X-Brightmail-Tracker:
\r
49 H4sIAAAAAAAAA+NgFjrNIsWRmVeSWpSXmKPExsUixCmqrLvy1G0/gxeb5Sxauz8zWVzd2s9u
\r
50 sWefl8X1mzOZHVg8zna3s3rcPc3lsXPWXXaPZ6tuMQewRHHZpKTmZJalFunbJXBlnPn6jamg
\r
51 TahizcaVjA2MV/m6GDk5JARMJGa8amKCsMUkLtxbz9bFyMUhJLCPUWJxx0NGCGc9o8SxyZuZ
\r
52 IZx7TBIbfy1gBGkREpjPKNFw3gfEZhPQkNi2fzlYXERAWmLn3dmsIDazQJ1E58Yz7F2MHBzC
\r
53 AuES9974gJgsAqoSD+Zbgpi8Ag4SZ097QNygIPHryCpWkDCngKPEzVuWEHvKJe627WebwMi/
\r
54 gJFhFaNsSm6Vbm5iZk5xarJucXJiXl5qka6hXm5miV5qSukmRnCYSfLsYHxzUOkQowAHoxIP
\r
55 b+aJW35CrIllxZW5hxglOZiURHmfnLztJ8SXlJ9SmZFYnBFfVJqTWnyIUYKDWUmEN2MxUI43
\r
56 JbGyKrUoHyYlzcGiJM57cIeDn5BAemJJanZqakFqEUxWhoNDSYJ3NchQwaLU9NSKtMycEoQ0
\r
57 EwcnyHAeoOFgNbzFBYm5xZnpEPlTjIpS4rwnQRICIImM0jy4XlgaeMUoDvSKMO8rkCoeYAqB
\r
58 634FNJgJaLBi4w2QwSWJCCmpBsZG1XmXp7oKhUWta7vYV3rpidWiZzWCW0O/bNDLUEy/fKb4
\r
59 39YL86UXz5+01GmjdS/brCezlKUyRPQn1bEdrn51zPFXzNoFpeu3WjCrMjMszjW5LvG22rWk
\r
60 dWJn9eVlE2/5/lDNWFZo3jY7ovP2zBNrGZ5yZLE1LH315duGxwHmVTu1PzKvbCpVYinOSDTU
\r
61 Yi4qTgQA7VWbgt4CAAA=
\r
62 Cc: dkg@fifthhorseman.net
\r
63 X-BeenThere: notmuch@notmuchmail.org
\r
64 X-Mailman-Version: 2.1.13
\r
66 List-Id: "Use and development of the notmuch mail system."
\r
67 <notmuch.notmuchmail.org>
\r
68 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
69 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
70 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
71 List-Post: <mailto:notmuch@notmuchmail.org>
\r
72 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
73 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
74 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
75 X-List-Received-Date: Sun, 04 Dec 2011 19:31:58 -0000
\r
77 In addition to simplifying the code, we'll need the notmuch_message_t*
\r
78 in show_message_body shortly.
\r
80 notmuch-client.h | 2 +-
\r
81 notmuch-reply.c | 3 +--
\r
82 notmuch-show.c | 3 +--
\r
83 show-message.c | 3 ++-
\r
84 4 files changed, 5 insertions(+), 6 deletions(-)
\r
86 diff --git a/notmuch-client.h b/notmuch-client.h
\r
87 index b50cb38..d7fb6ee 100644
\r
88 --- a/notmuch-client.h
\r
89 +++ b/notmuch-client.h
\r
90 @@ -162,7 +162,7 @@ char *
\r
91 query_string_from_args (void *ctx, int argc, char *argv[]);
\r
94 -show_message_body (const char *filename,
\r
95 +show_message_body (notmuch_message_t *message,
\r
96 const notmuch_show_format_t *format,
\r
97 notmuch_show_params_t *params);
\r
99 diff --git a/notmuch-reply.c b/notmuch-reply.c
\r
100 index 7ac879f..f8d5f64 100644
\r
101 --- a/notmuch-reply.c
\r
102 +++ b/notmuch-reply.c
\r
103 @@ -546,8 +546,7 @@ notmuch_reply_format_default(void *ctx,
\r
104 notmuch_message_get_header (message, "date"),
\r
105 notmuch_message_get_header (message, "from"));
\r
107 - show_message_body (notmuch_message_get_filename (message),
\r
109 + show_message_body (message, format, params);
\r
111 notmuch_message_destroy (message);
\r
113 diff --git a/notmuch-show.c b/notmuch-show.c
\r
114 index 603992a..1dee3aa 100644
\r
115 --- a/notmuch-show.c
\r
116 +++ b/notmuch-show.c
\r
117 @@ -753,8 +753,7 @@ show_message (void *ctx,
\r
120 if (format->part_content)
\r
121 - show_message_body (notmuch_message_get_filename (message),
\r
123 + show_message_body (message, format, params);
\r
125 if (params->part <= 0) {
\r
126 fputs (format->body_end, stdout);
\r
127 diff --git a/show-message.c b/show-message.c
\r
128 index d83f04e..09fa607 100644
\r
129 --- a/show-message.c
\r
130 +++ b/show-message.c
\r
131 @@ -175,7 +175,7 @@ show_message_part (GMimeObject *part,
\r
135 -show_message_body (const char *filename,
\r
136 +show_message_body (notmuch_message_t *message,
\r
137 const notmuch_show_format_t *format,
\r
138 notmuch_show_params_t *params)
\r
140 @@ -183,6 +183,7 @@ show_message_body (const char *filename,
\r
141 GMimeParser *parser = NULL;
\r
142 GMimeMessage *mime_message = NULL;
\r
143 notmuch_status_t ret = NOTMUCH_STATUS_SUCCESS;
\r
144 + const char *filename = notmuch_message_get_filename (message);
\r
146 show_message_state_t state;
\r