[PATCH] configure: add --without-api-docs option
[notmuch-archives.git] / c8 / cf3aada39b892b7365fb76de1bcbffe5daf79a
1 Return-Path: <awg@lagos.xvx.ca>\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 98BD3431FB6\r
6         for <notmuch@notmuchmail.org>; Wed, 30 Nov 2011 08:50:09 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_NONE=-0.0001] 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 mkVMSJydYHLJ for <notmuch@notmuchmail.org>;\r
16         Wed, 30 Nov 2011 08:50:09 -0800 (PST)\r
17 Received: from idcmail-mo1so.shaw.ca (idcmail-mo1so.shaw.ca [24.71.223.10])\r
18         by olra.theworths.org (Postfix) with ESMTP id EAF77429E21\r
19         for <notmuch@notmuchmail.org>; Wed, 30 Nov 2011 08:50:08 -0800 (PST)\r
20 Received: from pd2ml3so-ssvc.prod.shaw.ca ([10.0.141.148])\r
21         by pd3mo1so-svcs.prod.shaw.ca with ESMTP; 30 Nov 2011 09:40:42 -0700\r
22 X-Cloudmark-SP-Filtered: true\r
23 X-Cloudmark-SP-Result: v=1.1 cv=1h8qd3w5pbyJS47frJc7V6h9QwwiBhgsQMy9mbCO+wA=\r
24         c=1 sm=1\r
25         a=SLheIz2_iEgA:10 a=BLceEmwcHowA:10 a=yQp6g8lIsgqumF79BAsFDg==:17\r
26         a=9FJIHUyoQUidNP8FYhIA:9 a=QdprsC6vY5kK0t4dUzIA:7\r
27         a=HpAAvcLHHh0Zw7uRqdWCyQ==:117\r
28 Received: from unknown (HELO lagos.xvx.ca) ([96.52.216.56])\r
29         by pd2ml3so-dmz.prod.shaw.ca with ESMTP; 30 Nov 2011 09:40:42 -0700\r
30 Received: by lagos.xvx.ca (Postfix, from userid 1000)\r
31         id C5B99800300E; Wed, 30 Nov 2011 09:40:41 -0700 (MST)\r
32 From: Adam Wolfe Gordon <awg+notmuch@xvx.ca>\r
33 To: notmuch@notmuchmail.org,\r
34         awg@xvx.ca\r
35 Subject: [RFC PATCH 2/3] reply: New format 'html' that quotes text/html parts\r
36 Date: Wed, 30 Nov 2011 09:40:40 -0700\r
37 Message-Id: <1322671241-23438-3-git-send-email-awg+notmuch@xvx.ca>\r
38 X-Mailer: git-send-email 1.7.5.4\r
39 In-Reply-To: <1322671241-23438-1-git-send-email-awg+notmuch@xvx.ca>\r
40 References: <1322671241-23438-1-git-send-email-awg+notmuch@xvx.ca>\r
41 X-BeenThere: notmuch@notmuchmail.org\r
42 X-Mailman-Version: 2.1.13\r
43 Precedence: list\r
44 List-Id: "Use and development of the notmuch mail system."\r
45         <notmuch.notmuchmail.org>\r
46 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
47         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
48 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
49 List-Post: <mailto:notmuch@notmuchmail.org>\r
50 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
51 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
52         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
53 X-List-Received-Date: Wed, 30 Nov 2011 16:50:09 -0000\r
54 \r
55 A new format for notmuch reply that quotes text/html parts as well as text/plain\r
56 parts. The defaults have not changed, so notmuch reply with no arguments still\r
57 quotes only plain-text parts.  This is useful for people who regularly get\r
58 HTML-only email.\r
59 ---\r
60  notmuch-reply.c |    8 +++++++-\r
61  notmuch.c       |    6 +++++-\r
62  2 files changed, 12 insertions(+), 2 deletions(-)\r
63 \r
64 diff --git a/notmuch-reply.c b/notmuch-reply.c\r
65 index 7ac879f..d44e179 100644\r
66 --- a/notmuch-reply.c\r
67 +++ b/notmuch-reply.c\r
68 @@ -46,6 +46,8 @@ static const notmuch_show_format_t format_reply = {\r
69      ""\r
70  };\r
71  \r
72 +static notmuch_bool_t allow_html = FALSE;\r
73 +\r
74  static void\r
75  show_reply_headers (GMimeMessage *message)\r
76  {\r
77 @@ -104,7 +106,7 @@ reply_part_content (GMimeObject *part)\r
78         /* Ignore PGP/MIME cruft parts */\r
79      }\r
80      else if (g_mime_content_type_is_type (content_type, "text", "*") &&\r
81 -       !g_mime_content_type_is_type (content_type, "text", "html"))\r
82 +       (!g_mime_content_type_is_type (content_type, "text", "html") || allow_html))\r
83      {\r
84         GMimeStream *stream_stdout = NULL, *stream_filter = NULL;\r
85         GMimeDataWrapper *wrapper;\r
86 @@ -639,8 +641,12 @@ notmuch_reply_command (void *ctx, int argc, char *argv[])\r
87             opt = argv[i] + sizeof ("--format=") - 1;\r
88             if (strcmp (opt, "default") == 0) {\r
89                 reply_format_func = notmuch_reply_format_default;\r
90 +               allow_html = FALSE;\r
91             } else if (strcmp (opt, "headers-only") == 0) {\r
92                 reply_format_func = notmuch_reply_format_headers_only;\r
93 +           } else if (strcmp (opt, "html") == 0) {\r
94 +               reply_format_func = notmuch_reply_format_default;\r
95 +               allow_html = TRUE;\r
96             } else {\r
97                 fprintf (stderr, "Invalid value for --format: %s\n", opt);\r
98                 return 1;\r
99 diff --git a/notmuch.c b/notmuch.c\r
100 index d44ce9a..f72e79c 100644\r
101 --- a/notmuch.c\r
102 +++ b/notmuch.c\r
103 @@ -366,7 +366,7 @@ static command_t commands[] = {\r
104        "\n"\r
105        "\tSupported options for reply include:\n"\r
106        "\n"\r
107 -      "\t--format=(default|headers-only)\n"\r
108 +      "\t--format=(default|headers-only|html)\n"\r
109        "\n"\r
110        "\t\tdefault:\n"\r
111        "\t\t\tIncludes subject and quoted message body.\n"\r
112 @@ -375,6 +375,10 @@ static command_t commands[] = {\r
113        "\t\t\tOnly produces In-Reply-To, References, To\n"\r
114        "\t\t\tCc, and Bcc headers.\n"\r
115        "\n"\r
116 +      "\t\thtml:\n"\r
117 +      "\t\t\tIncludes subject and quoted message body,\n"\r
118 +      "\t\t\tincluding HTML parts.\n"\r
119 +      "\n"\r
120        "\tSee \"notmuch help search-terms\" for details of the search\n"\r
121        "\tterms syntax." },\r
122      { "tag", notmuch_tag_command,\r
123 -- \r
124 1.7.5.4\r
125 \r