Re: [PATCH 1/2] Add Google Inc. to AUTHORS as a contributor.
[notmuch-archives.git] / f3 / a8a2782f75a5f4e57ee4a2bdddfc4dc365cc6c
1 Return-Path: <markwalters1009@gmail.com>\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 C0712431FBF\r
6         for <notmuch@notmuchmail.org>; Sun, 22 Jul 2012 07:38:16 -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: 0.201\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0.201 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,\r
14         RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
15 Received: from olra.theworths.org ([127.0.0.1])\r
16         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
17         with ESMTP id AHn5qU65+sgx for <notmuch@notmuchmail.org>;\r
18         Sun, 22 Jul 2012 07:38:15 -0700 (PDT)\r
19 Received: from mail-wi0-f179.google.com (mail-wi0-f179.google.com\r
20         [209.85.212.179]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
21         (No client certificate requested)\r
22         by olra.theworths.org (Postfix) with ESMTPS id 8E56D431FC9\r
23         for <notmuch@notmuchmail.org>; Sun, 22 Jul 2012 07:38:12 -0700 (PDT)\r
24 Received: by wibhq4 with SMTP id hq4so1563921wib.2\r
25         for <notmuch@notmuchmail.org>; Sun, 22 Jul 2012 07:38:10 -0700 (PDT)\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
27         h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;\r
28         bh=P9dJc6Kay0QjkSUAsLliRbt89YsJ/5H1sV2x72Xq5hs=;\r
29         b=or/iZib6cThKiOfbQAoyYscO52d008xT+6OfCDvMKmQyDcFeVatS8tHPVqfkpWvpL/\r
30         tlg8ulmRbny2NC2KWpUN0aa0lrDQrqfmQdFNYjdHEktHeq1pAnIxUc8TxfjOBq87Grz9\r
31         dhSQfkNrveFIM1yF0wk/cjQEZt0f9HR9coWaa+XjfLPEF2TBKAigt5fS1+aA2D7H68Go\r
32         OdcqffUXNmd2WysQy/OR0tKswOdLfU2HWCQTfQ9No226BMhhAmH4l9gJgviTKmwOkxlV\r
33         6RYEhwzSz52G13pZDhM2313yRsOC48Wgqz1Q3KRp4TcBXZS5yopq1MTtom3Z560mhz5v\r
34         EHzQ==\r
35 Received: by 10.180.78.2 with SMTP id x2mr29027162wiw.10.1342967890815;\r
36         Sun, 22 Jul 2012 07:38:10 -0700 (PDT)\r
37 Received: from localhost (94-192-233-223.zone6.bethere.co.uk.\r
38  [94.192.233.223])      by mx.google.com with ESMTPS id\r
39  fu3sm16706155wib.10.2012.07.22.07.38.09        (version=TLSv1/SSLv3 cipher=OTHER);\r
40         Sun, 22 Jul 2012 07:38:09 -0700 (PDT)\r
41 From: Mark Walters <markwalters1009@gmail.com>\r
42 To: notmuch@notmuchmail.org\r
43 Subject: [PATCH 2/4] cli: show: implement --include-text-content for\r
44         --format=text\r
45 Date: Sun, 22 Jul 2012 15:37:57 +0100\r
46 Message-Id: <1342967879-20453-3-git-send-email-markwalters1009@gmail.com>\r
47 X-Mailer: git-send-email 1.7.9.1\r
48 In-Reply-To: <1342967879-20453-1-git-send-email-markwalters1009@gmail.com>\r
49 References: <1342967879-20453-1-git-send-email-markwalters1009@gmail.com>\r
50 X-BeenThere: notmuch@notmuchmail.org\r
51 X-Mailman-Version: 2.1.13\r
52 Precedence: list\r
53 List-Id: "Use and development of the notmuch mail system."\r
54         <notmuch.notmuchmail.org>\r
55 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
56         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
57 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
58 List-Post: <mailto:notmuch@notmuchmail.org>\r
59 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
60 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
61         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
62 X-List-Received-Date: Sun, 22 Jul 2012 14:38:17 -0000\r
63 \r
64 ---\r
65  notmuch-show.c |   13 +++++++++----\r
66  1 files changed, 9 insertions(+), 4 deletions(-)\r
67 \r
68 diff --git a/notmuch-show.c b/notmuch-show.c\r
69 index 35e3f22..6261b6d 100644\r
70 --- a/notmuch-show.c\r
71 +++ b/notmuch-show.c\r
72 @@ -537,11 +537,15 @@ format_part_text (const void *ctx, mime_node_t *node,\r
73         if (g_mime_content_type_is_type (content_type, "text", "*") &&\r
74             !g_mime_content_type_is_type (content_type, "text", "html"))\r
75         {\r
76 -           GMimeStream *stream_stdout = g_mime_stream_file_new (stdout);\r
77 -           g_mime_stream_file_set_owner (GMIME_STREAM_FILE (stream_stdout), FALSE);\r
78 -           show_text_part_content (node->part, stream_stdout, 0);\r
79 -           g_object_unref(stream_stdout);\r
80 +           if (params->include_text_content) {\r
81 +               GMimeStream *stream_stdout = g_mime_stream_file_new (stdout);\r
82 +               g_mime_stream_file_set_owner (GMIME_STREAM_FILE (stream_stdout), FALSE);\r
83 +               show_text_part_content (node->part, stream_stdout, 0);\r
84 +               g_object_unref(stream_stdout);\r
85 +           } else {\r
86 +               printf ("Text part (not included): %s\n",\r
87 +                       g_mime_content_type_to_string (content_type));\r
88 +           }\r
89         } else {\r
90             printf ("Non-text part: %s\n",\r
91                     g_mime_content_type_to_string (content_type));\r
92 -- \r
93 1.7.9.1\r
94 \r