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 1171C429E25
\r
6 for <notmuch@notmuchmail.org>; Fri, 9 Dec 2011 11:54:43 -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 Ns1X6yCinjl0 for <notmuch@notmuchmail.org>;
\r
16 Fri, 9 Dec 2011 11:54:42 -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 6C070429E2F
\r
20 for <notmuch@notmuchmail.org>; Fri, 9 Dec 2011 11:54:40 -0800 (PST)
\r
21 X-AuditID: 1209190c-b7f806d0000008d6-e6-4ee2677f5e32
\r
22 Received: from mailhub-auth-2.mit.edu ( [18.7.62.36])
\r
23 by dmz-mailsec-scanner-1.mit.edu (Symantec Messaging Gateway) with SMTP
\r
24 id BB.F6.02262.F7762EE4; Fri, 9 Dec 2011 14:54:39 -0500 (EST)
\r
25 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])
\r
26 by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id pB9Jsd8F029548;
\r
27 Fri, 9 Dec 2011 14:54:39 -0500
\r
28 Received: from drake.mit.edu (26-4-166.dynamic.csail.mit.edu [18.26.4.166])
\r
29 (authenticated bits=0)
\r
30 (User authenticated as amdragon@ATHENA.MIT.EDU)
\r
31 by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id pB9Jsb7Q013134
\r
32 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);
\r
33 Fri, 9 Dec 2011 14:54:38 -0500 (EST)
\r
34 Received: from amthrax by drake.mit.edu with local (Exim 4.76)
\r
35 (envelope-from <amthrax@drake.mit.edu>)
\r
36 id 1RZ6Wj-00015O-7I; Fri, 09 Dec 2011 14:54:37 -0500
\r
37 From: Austin Clements <amdragon@MIT.EDU>
\r
38 To: notmuch@notmuchmail.org
\r
39 Subject: [PATCH 1/4] show: Pass notmuch_message_t instead of path to
\r
41 Date: Fri, 9 Dec 2011 14:54:25 -0500
\r
42 Message-Id: <1323460468-4030-2-git-send-email-amdragon@mit.edu>
\r
43 X-Mailer: git-send-email 1.7.7.3
\r
44 In-Reply-To: <1323460468-4030-1-git-send-email-amdragon@mit.edu>
\r
45 References: <1323027100-10307-1-git-send-email-amdragon@mit.edu>
\r
46 <1323460468-4030-1-git-send-email-amdragon@mit.edu>
\r
47 X-Brightmail-Tracker:
\r
48 H4sIAAAAAAAAA+NgFtrIIsWRmVeSWpSXmKPExsUixG6noluf/sjPYN9Ca4vrN2cyOzB6PFt1
\r
49 izmAMYrLJiU1J7MstUjfLoEro79tAntBm1DF5JfrmRsYr/J1MXJySAiYSOz+epQFwhaTuHBv
\r
50 PRuILSSwj1Hi+J/ILkYuIHs9o8S8ny0sEM4xJomF+3dBOfMZJXontoK1sAloSGzbv5wRxBYR
\r
51 kJbYeXc2axcjBwezgJrEny4VEFNYIFzi3hsfkAoWAVWJrTM7WEFsXgF7iW2XLrFDHKEgcW71
\r
52 OTCbU8BB4turL+wQB5VJ3Oz8zj6BkX8BI8MqRtmU3Crd3MTMnOLUZN3i5MS8vNQiXUO93MwS
\r
53 vdSU0k2MoJDhlOTZwfjmoNIhRgEORiUeXk+vR35CrIllxZW5hxglOZiURHlfpwGF+JLyUyoz
\r
54 Eosz4otKc1KLDzFKcDArifCqyAPleFMSK6tSi/JhUtIcLErivNW7HvoJCaQnlqRmp6YWpBbB
\r
55 ZGU4OJQkeH+ADBUsSk1PrUjLzClBSDNxcIIM5wEaHhoJMry4IDG3ODMdIn+KUVFKnPcsSLMA
\r
56 SCKjNA+uFxbTrxjFgV4R5lUCaecBpgO47ldAg5mABn/JfgAyuCQRISXVwOiptdt+xTHzZc4x
\r
57 W9M4WSQ6WXy9y1nvF2lwRn0VEJa6Hv7g3rO5l8XKzyoqrm3u2LjI9G/EQ+43/a9qP3Bd50xz
\r
58 7d/Xml7/88Zv66eTJ9R9mpTwQuVXpPEihRwZAxOFfVucEmcmePBd4+G7LnGKadYr0/nC2dHz
\r
59 3vf4m67PWyxzhy344iU9LiWW4oxEQy3mouJEAHA2s2HEAgAA
\r
60 X-BeenThere: notmuch@notmuchmail.org
\r
61 X-Mailman-Version: 2.1.13
\r
63 List-Id: "Use and development of the notmuch mail system."
\r
64 <notmuch.notmuchmail.org>
\r
65 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
66 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
67 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
68 List-Post: <mailto:notmuch@notmuchmail.org>
\r
69 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
70 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
71 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
72 X-List-Received-Date: Fri, 09 Dec 2011 19:54:43 -0000
\r
74 In addition to simplifying the code, we'll need the notmuch_message_t*
\r
75 in show_message_body shortly.
\r
77 notmuch-client.h | 2 +-
\r
78 notmuch-reply.c | 3 +--
\r
79 notmuch-show.c | 3 +--
\r
80 show-message.c | 3 ++-
\r
81 4 files changed, 5 insertions(+), 6 deletions(-)
\r
83 diff --git a/notmuch-client.h b/notmuch-client.h
\r
84 index 703f856..be21781 100644
\r
85 --- a/notmuch-client.h
\r
86 +++ b/notmuch-client.h
\r
87 @@ -162,7 +162,7 @@ char *
\r
88 query_string_from_args (void *ctx, int argc, char *argv[]);
\r
91 -show_message_body (const char *filename,
\r
92 +show_message_body (notmuch_message_t *message,
\r
93 const notmuch_show_format_t *format,
\r
94 notmuch_show_params_t *params);
\r
96 diff --git a/notmuch-reply.c b/notmuch-reply.c
\r
97 index 7ac879f..f8d5f64 100644
\r
98 --- a/notmuch-reply.c
\r
99 +++ b/notmuch-reply.c
\r
100 @@ -546,8 +546,7 @@ notmuch_reply_format_default(void *ctx,
\r
101 notmuch_message_get_header (message, "date"),
\r
102 notmuch_message_get_header (message, "from"));
\r
104 - show_message_body (notmuch_message_get_filename (message),
\r
106 + show_message_body (message, format, params);
\r
108 notmuch_message_destroy (message);
\r
110 diff --git a/notmuch-show.c b/notmuch-show.c
\r
111 index 603992a..1dee3aa 100644
\r
112 --- a/notmuch-show.c
\r
113 +++ b/notmuch-show.c
\r
114 @@ -753,8 +753,7 @@ show_message (void *ctx,
\r
117 if (format->part_content)
\r
118 - show_message_body (notmuch_message_get_filename (message),
\r
120 + show_message_body (message, format, params);
\r
122 if (params->part <= 0) {
\r
123 fputs (format->body_end, stdout);
\r
124 diff --git a/show-message.c b/show-message.c
\r
125 index d83f04e..09fa607 100644
\r
126 --- a/show-message.c
\r
127 +++ b/show-message.c
\r
128 @@ -175,7 +175,7 @@ show_message_part (GMimeObject *part,
\r
132 -show_message_body (const char *filename,
\r
133 +show_message_body (notmuch_message_t *message,
\r
134 const notmuch_show_format_t *format,
\r
135 notmuch_show_params_t *params)
\r
137 @@ -183,6 +183,7 @@ show_message_body (const char *filename,
\r
138 GMimeParser *parser = NULL;
\r
139 GMimeMessage *mime_message = NULL;
\r
140 notmuch_status_t ret = NOTMUCH_STATUS_SUCCESS;
\r
141 + const char *filename = notmuch_message_get_filename (message);
\r
143 show_message_state_t state;
\r