Re: [PATCH 5/5] show: Convert raw format to the new self-recursive style
authorAustin Clements <amdragon@MIT.EDU>
Tue, 6 Mar 2012 18:43:06 +0000 (13:43 +1900)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:45:16 +0000 (09:45 -0800)
11/380b5a3c28916293251634718be360deadae80 [new file with mode: 0644]

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