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 2C373429E54
\r
6 for <notmuch@notmuchmail.org>; Mon, 23 Jan 2012 15:26:42 -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 xGKkEST9aSKc for <notmuch@notmuchmail.org>;
\r
16 Mon, 23 Jan 2012 15:26:41 -0800 (PST)
\r
17 Received: from dmz-mailsec-scanner-3.mit.edu (DMZ-MAILSEC-SCANNER-3.MIT.EDU
\r
19 by olra.theworths.org (Postfix) with ESMTP id 6B2C7429E21
\r
20 for <notmuch@notmuchmail.org>; Mon, 23 Jan 2012 15:26:41 -0800 (PST)
\r
21 X-AuditID: 1209190e-b7f7c6d0000008c3-6a-4f1decb0b4fb
\r
22 Received: from mailhub-auth-2.mit.edu ( [18.7.62.36])
\r
23 by dmz-mailsec-scanner-3.mit.edu (Symantec Messaging Gateway) with SMTP
\r
24 id 28.0E.02243.0BCED1F4; Mon, 23 Jan 2012 18:26:40 -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 q0NNQe75027444;
\r
27 Mon, 23 Jan 2012 18:26:40 -0500
\r
28 Received: from drake.mit.edu (26-4-180.dynamic.csail.mit.edu [18.26.4.180])
\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 q0NNQbYM024567
\r
32 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);
\r
33 Mon, 23 Jan 2012 18:26:39 -0500 (EST)
\r
34 Received: from amthrax by drake.mit.edu with local (Exim 4.77)
\r
35 (envelope-from <amthrax@drake.mit.edu>)
\r
36 id 1RpTHZ-0004qP-1D; Mon, 23 Jan 2012 18:26:37 -0500
\r
37 From: Austin Clements <amdragon@MIT.EDU>
\r
38 To: notmuch@notmuchmail.org
\r
39 Subject: [PATCH v4 2/3] show: Use consistent header ordering in the text
\r
41 Date: Mon, 23 Jan 2012 18:26:22 -0500
\r
42 Message-Id: <1327361183-18485-3-git-send-email-amdragon@mit.edu>
\r
43 X-Mailer: git-send-email 1.7.7.3
\r
44 In-Reply-To: <1327361183-18485-1-git-send-email-amdragon@mit.edu>
\r
45 References: <1326918507-28033-1-git-send-email-amdragon@mit.edu>
\r
46 <1327361183-18485-1-git-send-email-amdragon@mit.edu>
\r
47 X-Brightmail-Tracker:
\r
48 H4sIAAAAAAAAA+NgFjrHIsWRmVeSWpSXmKPExsUixG6norvhjay/wdFmS4urW/vZLZqmO1tc
\r
49 vzmT2eLNynmsDiweO2fdZfc4/HUhi8et+6/ZPZ6tusUcwBLFZZOSmpNZllqkb5fAlTHx3QH2
\r
50 gisyFXsfbmZrYDwt3sXIySEhYCJxfG87M4QtJnHh3nq2LkYuDiGBfYwST+/NZ4VwNjBKvFz3
\r
51 kQnCOc4kMffuZyhnPqPE+wdH2UH62QQ0JLbtX84IYosISEvsvDsbqJ2Dg1mgQGLyBWMQU1jA
\r
52 X+L0kQQQk0VAVeL7AQOQYl4BB4nzzRNZIY5QkDi3+hzYQE4BR4k/jR1gcSGBcom2W8dZJjDy
\r
53 L2BkWMUom5JbpZubmJlTnJqsW5ycmJeXWqRrrJebWaKXmlK6iREUbJySfDsYvx5UOsQowMGo
\r
54 xMN7YJqsvxBrYllxZe4hRkkOJiVRXtfXQCG+pPyUyozE4oz4otKc1OJDjBIczEoivGrngHK8
\r
55 KYmVValF+TApaQ4WJXFeNa13fkIC6YklqdmpqQWpRTBZGQ4OJQleLmBUCQkWpaanVqRl5pQg
\r
56 pJk4OEGG8wANZwCp4S0uSMwtzkyHyJ9iVJQS5z0GcpEASCKjNA+uF5YMXjGKA70izHsJpIoH
\r
57 mEjgul8BDWYCGsyRJwUyuCQRISXVwMiw2n6T5o3eXvk/bDdVnOuiKk1zZ1r0LN92eAKLk0xE
\r
58 8S32un9zj97i3xr1IXfpmkNnV8zrK7x7bO3iZdPnzZEsCV5rLLTT8tnDQ+FOM35MjGya0Xxj
\r
59 95KFmy/H/9v7UjR/SqedaFxdke9f6UsC9S8OVk2Kj1zDr2VTcfC54NugV5/sz65cOU1BiaU4
\r
60 I9FQi7moOBEAd8a2Y+ECAAA=
\r
61 Cc: tomi.ollila@iki.fi
\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, 23 Jan 2012 23:26:42 -0000
\r
76 Previously, top-level message headers were printed as Subject, From,
\r
77 To, Date, while embedded message headers were printed From, To,
\r
78 Subject, Date. This makes both cases use the former order and updates
\r
79 the tests accordingly.
\r
81 Strangely, the raw format also uses this function, so this also fixes
\r
82 the two raw format tests affected by this change.
\r
84 notmuch-show.c | 2 +-
\r
85 test/multipart | 12 ++++++------
\r
86 2 files changed, 7 insertions(+), 7 deletions(-)
\r
88 diff --git a/notmuch-show.c b/notmuch-show.c
\r
89 index 7b40568..682aa71 100644
\r
90 --- a/notmuch-show.c
\r
91 +++ b/notmuch-show.c
\r
92 @@ -364,6 +364,7 @@ format_headers_message_part_text (GMimeMessage *message)
\r
93 InternetAddressList *recipients;
\r
94 const char *recipients_string;
\r
96 + printf ("Subject: %s\n", g_mime_message_get_subject (message));
\r
97 printf ("From: %s\n", g_mime_message_get_sender (message));
\r
98 recipients = g_mime_message_get_recipients (message, GMIME_RECIPIENT_TYPE_TO);
\r
99 recipients_string = internet_address_list_to_string (recipients, 0);
\r
100 @@ -375,7 +376,6 @@ format_headers_message_part_text (GMimeMessage *message)
\r
101 if (recipients_string)
\r
102 printf ("Cc: %s\n",
\r
103 recipients_string);
\r
104 - printf ("Subject: %s\n", g_mime_message_get_subject (message));
\r
105 printf ("Date: %s\n", g_mime_message_get_date_as_string (message));
\r
108 diff --git a/test/multipart b/test/multipart
\r
109 index f83526b..2dd73f5 100755
\r
110 --- a/test/multipart
\r
111 +++ b/test/multipart
\r
112 @@ -121,9 +121,9 @@ Date: Fri, 05 Jan 2001 15:43:57 +0000
\r
114 part{ ID: 2, Content-type: multipart/mixed
\r
116 part{ ID: 3, Content-type: message/rfc822
\r
119 +Subject: html message
\r
120 From: Carl Worth <cworth@cworth.org>
\r
121 To: cworth@cworth.org
\r
122 -Subject: html message
\r
123 Date: Fri, 05 Jan 2001 15:42:57 +0000
\r
128 @@ -162,9 +162,9 @@ cat <<EOF >EXPECTED
\r
130 part{ ID: 2, Content-type: multipart/mixed
\r
132 part{ ID: 3, Content-type: message/rfc822
\r
135 +Subject: html message
\r
136 From: Carl Worth <cworth@cworth.org>
\r
137 To: cworth@cworth.org
\r
138 -Subject: html message
\r
139 Date: Fri, 05 Jan 2001 15:42:57 +0000
\r
144 @@ -200,9 +200,9 @@ cat <<EOF >EXPECTED
\r
146 part{ ID: 2, Content-type: multipart/mixed
\r
148 part{ ID: 3, Content-type: message/rfc822
\r
151 +Subject: html message
\r
152 From: Carl Worth <cworth@cworth.org>
\r
153 To: cworth@cworth.org
\r
154 -Subject: html message
\r
155 Date: Fri, 05 Jan 2001 15:42:57 +0000
\r
160 @@ -233,9 +233,9 @@ notmuch show --format=text --part=3 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OU
\r
161 cat <<EOF >EXPECTED
\r
163 part{ ID: 3, Content-type: message/rfc822
\r
166 +Subject: html message
\r
167 From: Carl Worth <cworth@cworth.org>
\r
168 To: cworth@cworth.org
\r
169 -Subject: html message
\r
170 Date: Fri, 05 Jan 2001 15:42:57 +0000
\r
175 @@ -452,9 +452,9 @@ notmuch show --format=raw --part=1 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUT
\r
176 # output should *not* include newline
\r
178 cat <<EOF >EXPECTED
\r
179 +Subject: html message
\r
180 From: Carl Worth <cworth@cworth.org>
\r
181 To: cworth@cworth.org
\r
182 -Subject: html message
\r
183 Date: Fri, 05 Jan 2001 15:42:57 +0000
\r
185 <p>This is an embedded message, with a multipart/alternative part.</p>
\r
186 @@ -476,9 +476,9 @@ test_expect_equal_file OUTPUT EXPECTED
\r
187 test_begin_subtest "--format=raw --part=2, multipart/mixed"
\r
188 notmuch show --format=raw --part=2 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT
\r
189 cat <<EOF >EXPECTED
\r
190 +Subject: html message
\r
191 From: Carl Worth <cworth@cworth.org>
\r
192 To: cworth@cworth.org
\r
193 -Subject: html message
\r
194 Date: Fri, 05 Jan 2001 15:42:57 +0000
\r
196 <p>This is an embedded message, with a multipart/alternative part.</p>
\r