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 50AB5429E29
\r
6 for <notmuch@notmuchmail.org>; Sun, 27 Nov 2011 18:21:28 -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 gEzaVNEAKSUY for <notmuch@notmuchmail.org>;
\r
16 Sun, 27 Nov 2011 18:21:26 -0800 (PST)
\r
17 Received: from dmz-mailsec-scanner-4.mit.edu (DMZ-MAILSEC-SCANNER-4.MIT.EDU
\r
19 by olra.theworths.org (Postfix) with ESMTP id 9960C429E30
\r
20 for <notmuch@notmuchmail.org>; Sun, 27 Nov 2011 18:21:24 -0800 (PST)
\r
21 X-AuditID: 1209190f-b7f6e6d0000008df-fb-4ed2f0242a9e
\r
22 Received: from mailhub-auth-3.mit.edu ( [18.9.21.43])
\r
23 by dmz-mailsec-scanner-4.mit.edu (Symantec Messaging Gateway) with SMTP
\r
24 id CE.F5.02271.420F2DE4; Sun, 27 Nov 2011 21:21:24 -0500 (EST)
\r
25 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])
\r
26 by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id pAS2LOpk020210;
\r
27 Sun, 27 Nov 2011 21:21:24 -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 pAS2LMCV020640
\r
33 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);
\r
34 Sun, 27 Nov 2011 21:21:23 -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 1RUqqQ-0003vI-H0; Sun, 27 Nov 2011 21:21:22 -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, 27 Nov 2011 21:21:08 -0500
\r
43 Message-Id: <1322446871-14986-2-git-send-email-amdragon@mit.edu>
\r
44 X-Mailer: git-send-email 1.7.5.4
\r
45 In-Reply-To: <1322446871-14986-1-git-send-email-amdragon@mit.edu>
\r
46 References: <1322446871-14986-1-git-send-email-amdragon@mit.edu>
\r
47 X-Brightmail-Tracker:
\r
48 H4sIAAAAAAAAA+NgFjrPIsWRmVeSWpSXmKPExsUixCmqravy4ZKfwZoOPovW7s9MFle39rNb
\r
49 7NnnZXH95kxmBxaPs93trB53T3N57Jx1l93j2apbzAEsUVw2Kak5mWWpRfp2CVwZZ75+Yypo
\r
50 E6pYs3ElYwPjVb4uRk4OCQETiXOtf1ggbDGJC/fWs3UxcnEICexjlGh7fpoJwtnAKLGms5kF
\r
51 wrnPJLH45XNGCGc+o8SchsmsIP1sAhoS2/YvZwSxRQSkJXbenQ0WZxaok+jceIa9i5GDQ1gg
\r
52 XOLeGx+QMIuAqsSree1gq3kFHCSeb1rFCnGGgsSvIxA2p4CjxNymLcwgthBQzbplR1knMPIv
\r
53 YGRYxSibklulm5uYmVOcmqxbnJyYl5dapGuil5tZopeaUrqJERxukvw7GL8dVDrEKMDBqMTD
\r
54 u/HyJT8h1sSy4srcQ4ySHExKorwv3gGF+JLyUyozEosz4otKc1KLDzFKcDArifD2HAXK8aYk
\r
55 VlalFuXDpKQ5WJTEeRt3OPgJCaQnlqRmp6YWpBbBZGU4OJQkeJPeAzUKFqWmp1akZeaUIKSZ
\r
56 ODhBhvMADRcBqeEtLkjMLc5Mh8ifYlSUEufVAUkIgCQySvPgemHp4BWjONArwrySIFU8wFQC
\r
57 1/0KaDAT0GCOmRdABpckIqSkGhjT3t148bRj4eGAO7cnF53iYNry0j6WOW9HvlTjXfUXexgm
\r
58 VqVryB/pnHH7U+R2Nb1ZB4R1VW/4fylO3BC1q+97QZ5NfYKKm8CB9D3+sbO0NedvO7zvxuEZ
\r
59 Mz2ERWM98y+ncG4I/qkdckXbWjP6Qq/7Zp2c1WFxx5dN9D20f/L/muWXLdfPE9VWYinOSDTU
\r
60 Yi4qTgQAHMlZHuICAAA=
\r
61 Cc: dkg@fifthhorseman.net
\r
62 X-BeenThere: notmuch@notmuchmail.org
\r
63 X-Mailman-Version: 2.1.13
\r
65 List-Id: "Use and development of the notmuch mail system."
\r
66 <notmuch.notmuchmail.org>
\r
67 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
68 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
69 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
70 List-Post: <mailto:notmuch@notmuchmail.org>
\r
71 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
72 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
73 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
74 X-List-Received-Date: Mon, 28 Nov 2011 02:21:28 -0000
\r
76 In addition to simplifying the code, we'll need the notmuch_message_t*
\r
77 in show_message_body shortly.
\r
79 notmuch-client.h | 2 +-
\r
80 notmuch-reply.c | 3 +--
\r
81 notmuch-show.c | 3 +--
\r
82 show-message.c | 3 ++-
\r
83 4 files changed, 5 insertions(+), 6 deletions(-)
\r
85 diff --git a/notmuch-client.h b/notmuch-client.h
\r
86 index b50cb38..d7fb6ee 100644
\r
87 --- a/notmuch-client.h
\r
88 +++ b/notmuch-client.h
\r
89 @@ -162,7 +162,7 @@ char *
\r
90 query_string_from_args (void *ctx, int argc, char *argv[]);
\r
93 -show_message_body (const char *filename,
\r
94 +show_message_body (notmuch_message_t *message,
\r
95 const notmuch_show_format_t *format,
\r
96 notmuch_show_params_t *params);
\r
98 diff --git a/notmuch-reply.c b/notmuch-reply.c
\r
99 index 7ac879f..f8d5f64 100644
\r
100 --- a/notmuch-reply.c
\r
101 +++ b/notmuch-reply.c
\r
102 @@ -546,8 +546,7 @@ notmuch_reply_format_default(void *ctx,
\r
103 notmuch_message_get_header (message, "date"),
\r
104 notmuch_message_get_header (message, "from"));
\r
106 - show_message_body (notmuch_message_get_filename (message),
\r
108 + show_message_body (message, format, params);
\r
110 notmuch_message_destroy (message);
\r
112 diff --git a/notmuch-show.c b/notmuch-show.c
\r
113 index 603992a..1dee3aa 100644
\r
114 --- a/notmuch-show.c
\r
115 +++ b/notmuch-show.c
\r
116 @@ -753,8 +753,7 @@ show_message (void *ctx,
\r
119 if (format->part_content)
\r
120 - show_message_body (notmuch_message_get_filename (message),
\r
122 + show_message_body (message, format, params);
\r
124 if (params->part <= 0) {
\r
125 fputs (format->body_end, stdout);
\r
126 diff --git a/show-message.c b/show-message.c
\r
127 index d83f04e..09fa607 100644
\r
128 --- a/show-message.c
\r
129 +++ b/show-message.c
\r
130 @@ -175,7 +175,7 @@ show_message_part (GMimeObject *part,
\r
134 -show_message_body (const char *filename,
\r
135 +show_message_body (notmuch_message_t *message,
\r
136 const notmuch_show_format_t *format,
\r
137 notmuch_show_params_t *params)
\r
139 @@ -183,6 +183,7 @@ show_message_body (const char *filename,
\r
140 GMimeParser *parser = NULL;
\r
141 GMimeMessage *mime_message = NULL;
\r
142 notmuch_status_t ret = NOTMUCH_STATUS_SUCCESS;
\r
143 + const char *filename = notmuch_message_get_filename (message);
\r
145 show_message_state_t state;
\r