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 7831D421189
\r
6 for <notmuch@notmuchmail.org>; Sun, 22 Jan 2012 18:31:24 -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 UpZvVFLFdnk6 for <notmuch@notmuchmail.org>;
\r
16 Sun, 22 Jan 2012 18:31:23 -0800 (PST)
\r
17 Received: from dmz-mailsec-scanner-5.mit.edu (DMZ-MAILSEC-SCANNER-5.MIT.EDU
\r
19 by olra.theworths.org (Postfix) with ESMTP id 3C65B429E5B
\r
20 for <notmuch@notmuchmail.org>; Sun, 22 Jan 2012 18:31:22 -0800 (PST)
\r
21 X-AuditID: 12074422-b7fd66d0000008f9-79-4f1cc6798df0
\r
22 Received: from mailhub-auth-1.mit.edu ( [18.9.21.35])
\r
23 by dmz-mailsec-scanner-5.mit.edu (Symantec Messaging Gateway) with SMTP
\r
24 id CE.46.02297.976CC1F4; Sun, 22 Jan 2012 21:31:21 -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 q0N2VKkE003216;
\r
27 Sun, 22 Jan 2012 21:31:20 -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 q0N2VJQw001244
\r
33 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);
\r
34 Sun, 22 Jan 2012 21:31:20 -0500 (EST)
\r
35 Received: from amthrax by drake.mit.edu with local (Exim 4.77)
\r
36 (envelope-from <amthrax@drake.mit.edu>)
\r
37 id 1Rp9gl-0001J6-MC; Sun, 22 Jan 2012 21:31:19 -0500
\r
38 From: Austin Clements <amdragon@MIT.EDU>
\r
39 To: notmuch@notmuchmail.org
\r
40 Subject: [PATCH v2 2/3] show: Use consistent header ordering in the text
\r
42 Date: Sun, 22 Jan 2012 21:31:12 -0500
\r
43 Message-Id: <1327285873-4713-3-git-send-email-amdragon@mit.edu>
\r
44 X-Mailer: git-send-email 1.7.7.3
\r
45 In-Reply-To: <1327285873-4713-1-git-send-email-amdragon@mit.edu>
\r
46 References: <1326918507-28033-1-git-send-email-amdragon@mit.edu>
\r
47 <1327285873-4713-1-git-send-email-amdragon@mit.edu>
\r
48 X-Brightmail-Tracker:
\r
49 H4sIAAAAAAAAA+NgFtrEIsWRmVeSWpSXmKPExsUixCmqrFt5TMbf4PxOPYvrN2cyOzB6PFt1
\r
50 izmAMYrLJiU1J7MstUjfLoErY+K7A+wFV2Qq9j7czNbAeFq8i5GTQ0LAROLL/KPMELaYxIV7
\r
51 69m6GLk4hAT2MUp07trJCuFsYJSYt/wkM4Rzn0mid+ZlKGc+o0T3gk2sIP1sAhoS2/YvZwSx
\r
52 RQSkJXbenQ0U5+BgFlCT+NOlAmIKC/hLLNgVAFLBIqAq0fXhPthmXgF7icsP10JdoSBxbvU5
\r
53 dhCbU8BBYvelE2AThQTKJO5fncA4gZF/ASPDKkbZlNwq3dzEzJzi1GTd4uTEvLzUIl1TvdzM
\r
54 Er3UlNJNjKCgYXdR2sH486DSIUYBDkYlHt6IpTL+QqyJZcWVuYcYJTmYlER5zY4ChfiS8lMq
\r
55 MxKLM+KLSnNSiw8xSnAwK4nwOn+W9hfiTUmsrEotyodJSXOwKInzqmu98xMSSE8sSc1OTS1I
\r
56 LYLJynBwKEnwfgUZKliUmp5akZaZU4KQZuLgBBnOAzT8EUgNb3FBYm5xZjpE/hSjopQ471+Q
\r
57 hABIIqM0D64XFtWvGMWBXhHmfQJSxQNMCHDdr4AGMwEN5siTAhlckoiQkmpgXHLL+4vNgv5d
\r
58 zqKHHB5vWBri9OD/PZndtzLsFvhYXXiz+2DWBL2rGfmH/C1ySzbx60ybY/xGgq9iyaNuF7ec
\r
59 9e/smF+apLi36J13sVLOVVhrxa+u2JGrsGCWV213/uMVvlGm9hbLtZtnnKro2sY3cWODnezl
\r
60 /4si2UzSJh48futWb3Oxo22mEktxRqKhFnNRcSIAxJgkoMUCAAA=
\r
61 X-BeenThere: notmuch@notmuchmail.org
\r
62 X-Mailman-Version: 2.1.13
\r
64 List-Id: "Use and development of the notmuch mail system."
\r
65 <notmuch.notmuchmail.org>
\r
66 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
67 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
68 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
69 List-Post: <mailto:notmuch@notmuchmail.org>
\r
70 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
71 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
72 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
73 X-List-Received-Date: Mon, 23 Jan 2012 02:31:24 -0000
\r
75 Previously, top-level message headers were printed as Subject, From,
\r
76 To, Date, while embedded message headers were printed From, To,
\r
77 Subject, Date. This makes both cases use the former order and updates
\r
78 the tests accordingly.
\r
80 Strangely, the raw format also uses this function, so this also fixes
\r
81 the two raw format tests affected by this change.
\r
83 notmuch-show.c | 2 +-
\r
84 test/multipart | 12 ++++++------
\r
85 2 files changed, 7 insertions(+), 7 deletions(-)
\r
87 diff --git a/notmuch-show.c b/notmuch-show.c
\r
88 index 7b40568..682aa71 100644
\r
89 --- a/notmuch-show.c
\r
90 +++ b/notmuch-show.c
\r
91 @@ -364,6 +364,7 @@ format_headers_message_part_text (GMimeMessage *message)
\r
92 InternetAddressList *recipients;
\r
93 const char *recipients_string;
\r
95 + printf ("Subject: %s\n", g_mime_message_get_subject (message));
\r
96 printf ("From: %s\n", g_mime_message_get_sender (message));
\r
97 recipients = g_mime_message_get_recipients (message, GMIME_RECIPIENT_TYPE_TO);
\r
98 recipients_string = internet_address_list_to_string (recipients, 0);
\r
99 @@ -375,7 +376,6 @@ format_headers_message_part_text (GMimeMessage *message)
\r
100 if (recipients_string)
\r
101 printf ("Cc: %s\n",
\r
102 recipients_string);
\r
103 - printf ("Subject: %s\n", g_mime_message_get_subject (message));
\r
104 printf ("Date: %s\n", g_mime_message_get_date_as_string (message));
\r
107 diff --git a/test/multipart b/test/multipart
\r
108 index f83526b..2dd73f5 100755
\r
109 --- a/test/multipart
\r
110 +++ b/test/multipart
\r
111 @@ -121,9 +121,9 @@ Date: Fri, 05 Jan 2001 15:43:57 +0000
\r
113 part{ ID: 2, Content-type: multipart/mixed
\r
115 part{ ID: 3, Content-type: message/rfc822
\r
118 +Subject: html message
\r
119 From: Carl Worth <cworth@cworth.org>
\r
120 To: cworth@cworth.org
\r
121 -Subject: html message
\r
122 Date: Fri, 05 Jan 2001 15:42:57 +0000
\r
127 @@ -162,9 +162,9 @@ cat <<EOF >EXPECTED
\r
129 part{ ID: 2, Content-type: multipart/mixed
\r
131 part{ ID: 3, Content-type: message/rfc822
\r
134 +Subject: html message
\r
135 From: Carl Worth <cworth@cworth.org>
\r
136 To: cworth@cworth.org
\r
137 -Subject: html message
\r
138 Date: Fri, 05 Jan 2001 15:42:57 +0000
\r
143 @@ -200,9 +200,9 @@ cat <<EOF >EXPECTED
\r
145 part{ ID: 2, Content-type: multipart/mixed
\r
147 part{ ID: 3, Content-type: message/rfc822
\r
150 +Subject: html message
\r
151 From: Carl Worth <cworth@cworth.org>
\r
152 To: cworth@cworth.org
\r
153 -Subject: html message
\r
154 Date: Fri, 05 Jan 2001 15:42:57 +0000
\r
159 @@ -233,9 +233,9 @@ notmuch show --format=text --part=3 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OU
\r
160 cat <<EOF >EXPECTED
\r
162 part{ ID: 3, Content-type: message/rfc822
\r
165 +Subject: html message
\r
166 From: Carl Worth <cworth@cworth.org>
\r
167 To: cworth@cworth.org
\r
168 -Subject: html message
\r
169 Date: Fri, 05 Jan 2001 15:42:57 +0000
\r
174 @@ -452,9 +452,9 @@ notmuch show --format=raw --part=1 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUT
\r
175 # output should *not* include newline
\r
177 cat <<EOF >EXPECTED
\r
178 +Subject: html message
\r
179 From: Carl Worth <cworth@cworth.org>
\r
180 To: cworth@cworth.org
\r
181 -Subject: html message
\r
182 Date: Fri, 05 Jan 2001 15:42:57 +0000
\r
184 <p>This is an embedded message, with a multipart/alternative part.</p>
\r
185 @@ -476,9 +476,9 @@ test_expect_equal_file OUTPUT EXPECTED
\r
186 test_begin_subtest "--format=raw --part=2, multipart/mixed"
\r
187 notmuch show --format=raw --part=2 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
\r
188 cat <<EOF >EXPECTED
\r
189 +Subject: html message
\r
190 From: Carl Worth <cworth@cworth.org>
\r
191 To: cworth@cworth.org
\r
192 -Subject: html message
\r
193 Date: Fri, 05 Jan 2001 15:42:57 +0000
\r
195 <p>This is an embedded message, with a multipart/alternative part.</p>
\r