From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id C5816429E38 for ; Sun, 5 Jun 2011 17:29:46 -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 g9sIZnT4EZqz for ; Sun, 5 Jun 2011 17:29:45 -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 7A6A3429E27 for ; Sun, 5 Jun 2011 17:29:40 -0700 (PDT) Received: from fire-doxen.imss.caltech.edu (localhost [127.0.0.1]) by fire-doxen-postvirus (Postfix) with ESMTP id AABA132806A for ; Sun, 5 Jun 2011 17:22:37 -0700 (PDT) X-Spam-Scanned: at Caltech-IMSS on fire-doxen by amavisd-new Received: from servo.finestructure.net (cpe-98-149-172-122.socal.res.rr.com [98.149.172.122]) (Authenticated sender: jrollins) by fire-doxen-submit (Postfix) with ESMTP id 9B4603280D8 for ; Sun, 5 Jun 2011 17:22:29 -0700 (PDT) Received: by servo.finestructure.net (Postfix, from userid 1000) id 1838C19A; Sun, 5 Jun 2011 17:29:31 -0700 (PDT) From: Jameson Graef Rollins To: Notmuch Mail Subject: improving message/rfc822 part handling Date: Sun, 5 Jun 2011 17:29:24 -0700 Message-Id: <1307320169-29905-1-git-send-email-jrollins@finestructure.net> X-Mailer: git-send-email 1.7.4.4 In-Reply-To: <87sjrsi2b4.fsf@servo.factory.finestructure.net> References: <87sjrsi2b4.fsf@servo.factory.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: Mon, 06 Jun 2011 00:29:47 -0000 So the following patch series is my attempt to improve handling of message/rfc822 parts. The first couple of patches fix/overhaul the multipart test, and the last two improve the message/rfc822 part output and emacs handling, respectively. The fix outputs the rfc822 message in a format similar to that of the outer message, including "headers" and "body" fields. What this doesn't yet address is the raw output of message/rfc822 parts. The raw output of message/rfc822 parts /should/ be the full raw message. However, I have not yet figured out how to do that yet, so the multipart test for raw message/rfc822 parts is not yet fixed. The problem is really gmime's handling of message parts. There doesn't seem to be a gmime function that will return the message part as a GMimeObject. This means that we can't access all the message headers, or the messages sub parts as mime objects. There may be a way to hack around gmime's limitations, but I haven't figured it out yet. If someone else wants to take a crack at it, that would be great. In the mean time, I'm opening a bug report with gmime to request a function to return the rfc822 part as a GMimeObject. jamie.