From: Austin Clements Date: Tue, 6 Mar 2012 18:43:06 +0000 (+1900) Subject: Re: [PATCH 5/5] show: Convert raw format to the new self-recursive style X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=a001c72564492b16531a4ac4e925d461b6430139;p=notmuch-archives.git Re: [PATCH 5/5] show: Convert raw format to the new self-recursive style --- diff --git a/11/380b5a3c28916293251634718be360deadae80 b/11/380b5a3c28916293251634718be360deadae80 new file mode 100644 index 000000000..1f5b6921f --- /dev/null +++ b/11/380b5a3c28916293251634718be360deadae80 @@ -0,0 +1,133 @@ +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 9834F431FBC + for ; Tue, 6 Mar 2012 10:43:11 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.7 +X-Spam-Level: +X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 q10vUcaOeGqM for ; + Tue, 6 Mar 2012 10:43:09 -0800 (PST) +Received: from dmz-mailsec-scanner-2.mit.edu (DMZ-MAILSEC-SCANNER-2.MIT.EDU + [18.9.25.13]) + by olra.theworths.org (Postfix) with ESMTP id 474C8431FAE + for ; Tue, 6 Mar 2012 10:43:09 -0800 (PST) +X-AuditID: 1209190d-b7fbf6d0000008ba-2b-4f565abc6f43 +Received: from mailhub-auth-1.mit.edu ( [18.9.21.35]) + by dmz-mailsec-scanner-2.mit.edu (Symantec Messaging Gateway) with SMTP + id E7.31.02234.CBA565F4; Tue, 6 Mar 2012 13:43:08 -0500 (EST) +Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) + by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id q26Ih7Ep015091; + Tue, 6 Mar 2012 13:43:08 -0500 +Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91]) + (authenticated bits=0) + (User authenticated as amdragon@ATHENA.MIT.EDU) + by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q26Ih6Hu014839 + (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); + Tue, 6 Mar 2012 13:43:07 -0500 (EST) +Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77) + (envelope-from ) + id 1S4zLm-0001qo-Bn; Tue, 06 Mar 2012 13:43:06 -0500 +Date: Tue, 6 Mar 2012 13:43:06 -0500 +From: Austin Clements +To: Jameson Graef Rollins +Subject: Re: [PATCH 5/5] show: Convert raw format to the new self-recursive + style +Message-ID: <20120306184306.GA5457@mit.edu> +References: <1330752025-2542-1-git-send-email-amdragon@mit.edu> + <1330752025-2542-6-git-send-email-amdragon@mit.edu> + <87zkbxqr09.fsf@servo.finestructure.net> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline +In-Reply-To: <87zkbxqr09.fsf@servo.finestructure.net> +User-Agent: Mutt/1.5.21 (2010-09-15) +X-Brightmail-Tracker: + H4sIAAAAAAAAA+NgFmpkleLIzCtJLcpLzFFi42IR4hRV1t0TFeZv8Gm1vsWefV4W12/OZHZg + 8rh7msvj2apbzAFMUVw2Kak5mWWpRfp2CVwZ1xd+Yy54IVpx5V5BA+N+wS5GTg4JAROJVe/P + M0HYYhIX7q1n62Lk4hAS2McosWnmF3YIZz2jxNbfV1hBqoQETjBJLH3rD5FYwiixbeF2FpAE + i4CKxM2mbkYQm01AQ2Lb/uVgtoiAmUTPlz9gNrOAtMS3381g64QFgiU6//8As3kFtCX+L/rP + DDF0AaPE+ZdToBKCEidnPmGBaNaSuPHvJVCcA2zQ8n8cIGFOAVOJ9vXfwUpEgW6YcnIb2wRG + oVlIumch6Z6F0L2AkXkVo2xKbpVubmJmTnFqsm5xcmJeXmqRrpFebmaJXmpK6SZGcEhL8u5g + fHdQ6RCjAAejEg9vlW6YvxBrYllxZe4hRkkOJiVR3pvhQCG+pPyUyozE4oz4otKc1OJDjBIc + zEoivN/eh/oL8aYkVlalFuXDpKQ5WJTEeVW13vkJCaQnlqRmp6YWpBbBZGU4OJQkeC2AsSsk + WJSanlqRlplTgpBm4uAEGc4DNNwRpIa3uCAxtzgzHSJ/ilFRSpz3WSRQQgAkkVGaB9cLSzmv + GMWBXhHmFQNp5wGmK7juV0CDmYAGtykHgwwuSURISTUwLmhzXbum9e/1t4cKHI2fP9gyUfR6 + gE3AjRuhnUF6y5QCKzw7hV7k1n5LF3/8e9oODe32Mtf4V20rf9u3rhPnT7VOu5nVp+sr+vq6 + s4aO2Gm55gv9Vxuse7bVh/9Walwxze+glNu/1mm/2tdq773F9ZP7QKzu1bo5K857zRF4mxKf + fqK9Sd9AiaU4I9FQi7moOBEAIImrrhQDAAA= +Cc: notmuch@notmuchmail.org +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: Tue, 06 Mar 2012 18:43:11 -0000 + +TL;DR: I had a MIMEpiphany and I'm sending a new version of this +series that I think will address your concerns. + +Quoth Jameson Graef Rollins on Mar 03 at 2:05 pm: +> Hey, Austin. As always, thank you so much for your hard work on this +> rewrite. It looks like things are definitely moving the right +> direction. +> +> I haven't done a full review of this patch set, and I've been pretty out +> of the loop on this stuff recently, but I do notice that there are some +> changes to the tests that don't look right to me. +> +> On Sat, 3 Mar 2012 00:20:25 -0500, Austin Clements wrote: +> > This is fully compatible for root and leaf parts, but drops support +> > for interior parts. Showing interior parts in raw has always been +> > braindead broken, so I don't think anyone will miss this. Tests have +> > been updated to reflect this. +> +> I think I'm confused about this "drop support for interior parts". What +> constitutes an "interior part"? Aren't all parts interior? It looks +> From the patch that maybe you're referring specifically to rfc822 parts? + +Interior parts are any part that isn't a root part (the whole message) +or a leaf part. + +I had originally planned to simply deprecate raw in favor of two new +formats: "body", which outputted just bodies with transfer decoding +(which, for rfc822 parts, would include the attached message headers, +but not the envelope headers) and "source", which outputted full parts +with headers. I had been thinking that "source" would be necessary +for fetching the entire message and "body" for fetching attachments +and other leaf parts, but then it dawned on me that even trivial +messages have two parts already: part 0 is an rfc822 part representing +the whole message and part 1 is the body. Hence, modulo specialty +uses like crypto, "body" was already sufficient for both uses *and* +compatible with "raw" for root and leaf parts. + +I've updated my series to reflect this. Raw now works for any part. + +> > test_begin_subtest "--format=raw --part=4, rfc822's html part" +> > -notmuch show --format=raw --part=4 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT +> > +notmuch show --format=raw --part=4 'id:87liy5ap00.fsf@yoom.home.cworth.org' >&OUTPUT +> > cat <EXPECTED +> > -

This is an embedded message, with a multipart/alternative part.

+> > -This is an embedded message, with a multipart/alternative part. +> > +Error: Raw only supports root and leaf parts +> > EOF +> > test_expect_equal_file OUTPUT EXPECTED +> +> Maybe this is ultimately a limitation of what we can expect the raw +> formatter to do, but isn't this a leaf part? + +Actually that was a typo in the test name. Part 4 is a multipart, not +a leaf part. The new series includes a patch for this.