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