[PATCH 2/4] Fix notmuch-reply to not output "Non-text part:" lines for non-leafnode...
authorJameson Graef Rollins <jrollins@finestructure.net>
Wed, 8 Jun 2011 19:30:07 +0000 (12:30 +1700)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:38:34 +0000 (09:38 -0800)
d2/6f4ed18195031bc93291a25975a86dbac6b129 [new file with mode: 0644]

diff --git a/d2/6f4ed18195031bc93291a25975a86dbac6b129 b/d2/6f4ed18195031bc93291a25975a86dbac6b129
new file mode 100644 (file)
index 0000000..fa6040b
--- /dev/null
@@ -0,0 +1,93 @@
+Return-Path: <jrollins@servo.finestructure.net>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 86B19429E28\r
+       for <notmuch@notmuchmail.org>; Wed,  8 Jun 2011 12:30:17 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -1.921\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-1.921 tagged_above=-999 required=5\r
+       tests=[NO_DNS_FOR_FROM=0.379, RCVD_IN_DNSWL_MED=-2.3]\r
+       autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id tWhMMhbVz7SW for <notmuch@notmuchmail.org>;\r
+       Wed,  8 Jun 2011 12:30:16 -0700 (PDT)\r
+Received: from outgoing-mail.its.caltech.edu (outgoing-mail.its.caltech.edu\r
+       [131.215.239.19])\r
+       by olra.theworths.org (Postfix) with ESMTP id C3A85429E25\r
+       for <notmuch@notmuchmail.org>; Wed,  8 Jun 2011 12:30:16 -0700 (PDT)\r
+Received: from earth-doxen.imss.caltech.edu (localhost [127.0.0.1])\r
+       by earth-doxen-postvirus (Postfix) with ESMTP id 3341E66E02B9;\r
+       Wed,  8 Jun 2011 12:30:15 -0700 (PDT)\r
+X-Spam-Scanned: at Caltech-IMSS on earth-doxen by amavisd-new\r
+Received: from servo.finestructure.net (gwave-108.ligo.caltech.edu\r
+       [131.215.114.108]) (Authenticated sender: jrollins)\r
+       by earth-doxen-submit (Postfix) with ESMTP id CE26766E0474;\r
+       Wed,  8 Jun 2011 12:30:11 -0700 (PDT)\r
+Received: by servo.finestructure.net (Postfix, from userid 1000)\r
+       id E51A56F3; Wed,  8 Jun 2011 12:30:12 -0700 (PDT)\r
+From: Jameson Graef Rollins <jrollins@finestructure.net>\r
+To: Notmuch Mail <notmuch@notmuchmail.org>\r
+Subject: [PATCH 2/4] Fix notmuch-reply to not output "Non-text part:" lines\r
+       for non-leafnode parts.\r
+Date: Wed,  8 Jun 2011 12:30:07 -0700\r
+Message-Id: <1307561409-5646-3-git-send-email-jrollins@finestructure.net>\r
+X-Mailer: git-send-email 1.7.5.3\r
+In-Reply-To: <1307561409-5646-2-git-send-email-jrollins@finestructure.net>\r
+References: <1307320169-29905-4-git-send-email-jrollins@finestructure.net>\r
+       <1307561409-5646-1-git-send-email-jrollins@finestructure.net>\r
+       <1307561409-5646-2-git-send-email-jrollins@finestructure.net>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Wed, 08 Jun 2011 19:30:17 -0000\r
+\r
+These lines are just cruft in this case, and can be removed.\r
+---\r
+ notmuch-reply.c |   11 ++++++-----\r
+ 1 files changed, 6 insertions(+), 5 deletions(-)\r
+\r
+diff --git a/notmuch-reply.c b/notmuch-reply.c\r
+index a19eb19..7a76ba3 100644\r
+--- a/notmuch-reply.c\r
++++ b/notmuch-reply.c\r
+@@ -93,7 +93,12 @@ reply_part_content (GMimeObject *part)\r
+     GMimeContentType *content_type = g_mime_object_get_content_type (GMIME_OBJECT (part));\r
+     GMimeContentDisposition *disposition = g_mime_object_get_content_disposition (part);\r
\r
+-    if (g_mime_content_type_is_type (content_type, "text", "*") &&\r
++    if (g_mime_content_type_is_type (content_type, "multipart", "*") ||\r
++      g_mime_content_type_is_type (content_type, "message", "rfc822"))\r
++    {\r
++      /* Output nothing, since multipart subparts will be handled individually. */\r
++    }\r
++    else if (g_mime_content_type_is_type (content_type, "text", "*") &&\r
+       !g_mime_content_type_is_type (content_type, "text", "html"))\r
+     {\r
+       GMimeStream *stream_stdout = NULL, *stream_filter = NULL;\r
+@@ -120,10 +125,6 @@ reply_part_content (GMimeObject *part)\r
+       if (stream_stdout)\r
+           g_object_unref(stream_stdout);\r
+     }\r
+-    else if (g_mime_content_type_is_type (content_type, "message", "rfc822"))\r
+-    {\r
+-      /* Output nothing, since rfc822 subparts will be handled individually. */\r
+-    }\r
+     else\r
+     {\r
+       if (disposition &&\r
+-- \r
+1.7.5.3\r
+\r