Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 60 / 5beb13d64df6f6ce22e3134d5dca3f90291de1
1 Return-Path: <jrollins@servo.finestructure.net>\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 56378431FD0\r
6         for <notmuch@notmuchmail.org>; Thu,  2 Jun 2011 09:39:10 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -1.921\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-1.921 tagged_above=-999 required=5\r
12         tests=[NO_DNS_FOR_FROM=0.379, RCVD_IN_DNSWL_MED=-2.3]\r
13         autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id VxuV2A-3o1Hb for <notmuch@notmuchmail.org>;\r
17         Thu,  2 Jun 2011 09:39:09 -0700 (PDT)\r
18 Received: from outgoing-mail.its.caltech.edu (outgoing-mail.its.caltech.edu\r
19         [131.215.239.19])\r
20         by olra.theworths.org (Postfix) with ESMTP id D893C431FB6\r
21         for <notmuch@notmuchmail.org>; Thu,  2 Jun 2011 09:39:09 -0700 (PDT)\r
22 Received: from earth-doxen.imss.caltech.edu (localhost [127.0.0.1])\r
23         by earth-doxen-postvirus (Postfix) with ESMTP id 3FDE766E0374;\r
24         Thu,  2 Jun 2011 09:39:08 -0700 (PDT)\r
25 X-Spam-Scanned: at Caltech-IMSS on earth-doxen by amavisd-new\r
26 Received: from servo.finestructure.net (cpe-98-149-172-122.socal.res.rr.com\r
27         [98.149.172.122]) (Authenticated sender: jrollins)\r
28         by earth-doxen-submit (Postfix) with ESMTP id 64E6666E001F;\r
29         Thu,  2 Jun 2011 09:38:58 -0700 (PDT)\r
30 Received: by servo.finestructure.net (Postfix, from userid 1000)\r
31         id 21D91AD8; Thu,  2 Jun 2011 09:38:59 -0700 (PDT)\r
32 From: Jameson Graef Rollins <jrollins@finestructure.net>\r
33 To: Notmuch Mail <notmuch@notmuchmail.org>\r
34 Subject: [PATCH] Do not attept to output part raw if part is not GMimePart.\r
35 Date: Thu,  2 Jun 2011 09:38:55 -0700\r
36 Message-Id: <1307032735-27427-1-git-send-email-jrollins@finestructure.net>\r
37 X-Mailer: git-send-email 1.7.4.4\r
38 X-BeenThere: notmuch@notmuchmail.org\r
39 X-Mailman-Version: 2.1.13\r
40 Precedence: list\r
41 List-Id: "Use and development of the notmuch mail system."\r
42         <notmuch.notmuchmail.org>\r
43 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
44         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
45 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
46 List-Post: <mailto:notmuch@notmuchmail.org>\r
47 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
48 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
49         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
50 X-List-Received-Date: Thu, 02 Jun 2011 16:39:10 -0000\r
51 \r
52 This was a minor oversite in checking of part type when outputing\r
53 content raw.  This was causing gmime was to throw an exception to\r
54 stderr.\r
55 \r
56 Unfortunately the gmime exception was not being caught by notmuch, or\r
57 the test suite.  I'm not sure if notmuch should have done anything in\r
58 this case, but certainly the test suite should be capable of detecting\r
59 that something unexpected was output to stderr.\r
60 ---\r
61  notmuch-show.c |    5 +++--\r
62  1 files changed, 3 insertions(+), 2 deletions(-)\r
63 \r
64 diff --git a/notmuch-show.c b/notmuch-show.c\r
65 index 9267d02..3b4f775 100644\r
66 --- a/notmuch-show.c\r
67 +++ b/notmuch-show.c\r
68 @@ -646,14 +646,15 @@ format_part_content_raw (GMimeObject *part)\r
69  {\r
70      GMimeStream *stream_stdout;\r
71      GMimeStream *stream_filter = NULL;\r
72 -    GMimeDataWrapper *wrapper;\r
73 +    GMimeDataWrapper *wrapper = NULL;\r
74  \r
75      stream_stdout = g_mime_stream_file_new (stdout);\r
76      g_mime_stream_file_set_owner (GMIME_STREAM_FILE (stream_stdout), FALSE);\r
77  \r
78      stream_filter = g_mime_stream_filter_new (stream_stdout);\r
79  \r
80 -    wrapper = g_mime_part_get_content_object (GMIME_PART (part));\r
81 +    if (GMIME_IS_PART (part))\r
82 +       wrapper = g_mime_part_get_content_object (GMIME_PART (part));\r
83  \r
84      if (wrapper && stream_filter)\r
85         g_mime_data_wrapper_write_to_stream (wrapper, stream_filter);\r
86 -- \r
87 1.7.4.4\r
88 \r