Re: [PATCH v2] emacs: show: lazy part bugfix
authorAustin Clements <amdragon@MIT.EDU>
Wed, 4 Sep 2013 16:16:28 +0000 (12:16 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:56:56 +0000 (09:56 -0800)
af/1761a058fd923d9d89d297dafbb298bda2871e [new file with mode: 0644]

diff --git a/af/1761a058fd923d9d89d297dafbb298bda2871e b/af/1761a058fd923d9d89d297dafbb298bda2871e
new file mode 100644 (file)
index 0000000..fe42c7d
--- /dev/null
@@ -0,0 +1,123 @@
+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 D171D429E40\r
+       for <notmuch@notmuchmail.org>; Wed,  4 Sep 2013 09:16:41 -0700 (PDT)\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 YGzxzqT-17Aw for <notmuch@notmuchmail.org>;\r
+       Wed,  4 Sep 2013 09:16:35 -0700 (PDT)\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 86EFC429E34\r
+       for <notmuch@notmuchmail.org>; Wed,  4 Sep 2013 09:16:35 -0700 (PDT)\r
+X-AuditID: 1209190d-b7f078e000000937-4b-52275ce2d49d\r
+Received: from mailhub-auth-3.mit.edu ( [18.9.21.43])\r
+       by dmz-mailsec-scanner-2.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id 2B.3E.02359.2EC57225; Wed,  4 Sep 2013 12:16:34 -0400 (EDT)\r
+Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11])\r
+       by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id r84GGVlN030500; \r
+       Wed, 4 Sep 2013 12:16:34 -0400\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.8/8.12.4) with ESMTP id r84GGT31002437\r
+       (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT);\r
+       Wed, 4 Sep 2013 12:16:30 -0400\r
+Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.80)\r
+       (envelope-from <amdragon@mit.edu>)\r
+       id 1VHFkq-0005ac-Tn; Wed, 04 Sep 2013 12:16:28 -0400\r
+Date: Wed, 4 Sep 2013 12:16:28 -0400\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: Jameson Graef Rollins <jrollins@finestructure.net>\r
+Subject: Re: [PATCH v2] emacs: show: lazy part bugfix\r
+Message-ID: <20130904161628.GC1426@mit.edu>\r
+References: <1377246875-7784-1-git-send-email-markwalters1009@gmail.com>\r
+       <1378279835-28288-1-git-send-email-markwalters1009@gmail.com>\r
+       <20130904145639.GB1426@mit.edu>\r
+       <87hae07fhs.fsf@servo.finestructure.net>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=utf-8\r
+Content-Disposition: inline\r
+Content-Transfer-Encoding: 8bit\r
+In-Reply-To: <87hae07fhs.fsf@servo.finestructure.net>\r
+User-Agent: Mutt/1.5.21 (2010-09-15)\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFlrIKsWRmVeSWpSXmKPExsUixCmqrfsoRj3I4NVUE4s9+7wsVs/lsbh+\r
+       cyazA7PH3dNcHjtn3WX3eLbqFnMAcxSXTUpqTmZZapG+XQJXxsFOkYJvAhU9uy+wNTDu4+1i\r
+       5OSQEDCRePH8NRuELSZx4d56IJuLQ0hgH6PExc4mRpCEkMAGRolbbUoQiVNMEms7u9ggEksY\r
+       JS5/SgGxWQRUJJZMvMoKYrMJaEhs278crFlEwEyi58sfMJtZwFVixoVdTCC2sICpxOqJZ9hB\r
+       bF4BbYnnE9cyQSy4yihx5fIzqISgxMmZT1ggmtUl/sy7xNzFyAFkS0ss/8cBEZaXaN46mxnE\r
+       5gSaOa9/Nli5KNA9U05uY5vAKDwLyaRZSCbNQpg0C8mkBYwsqxhlU3KrdHMTM3OKU5N1i5MT\r
+       8/JSi3SN9HIzS/RSU0o3MYJjQpJ3B+O7g0qHGAU4GJV4eBuM1YOEWBPLiitzDzFKcjApifIa\r
+       hwOF+JLyUyozEosz4otKc1KLDzFKcDArifDKeQPleFMSK6tSi/JhUtIcLErivE+fng0UEkhP\r
+       LEnNTk0tSC2CycpwcChJ8P6OBmoULEpNT61Iy8wpQUgzcXCCDOcBGs4eAzK8uCAxtzgzHSJ/\r
+       ilFRSpyXDyQhAJLIKM2D64WlrFeM4kCvCPPygFTxANMdXPcroMFMQIPTPquCDC5JREhJNTCW\r
+       Ol+o0V9b0v+2xs3fe7b78lNqZ6QXrGCUzg4+9+5Aifuv7P+SNVPOZC9aqHDRrWVPnI208b64\r
+       Kg0Nb0GT6TLnvRQOKt92mjXNRMhOzb6Y6co55dasCbqWYsfWbjsRFBTswMa/jEmoYMHEG0qf\r
+       985R6a+6uOvmtPSJH6+aqH48mWnFUxvgdlWJpTgj0VCLuag4EQA7K6l7NAMAAA==\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: Wed, 04 Sep 2013 16:16:42 -0000\r
+\r
+Quoth Jameson Graef Rollins on Sep 04 at  8:50 am:\r
+> On Wed, Sep 04 2013, Austin Clements <amdragon@MIT.EDU> wrote:\r
+> >> Now, some mime parts have subparts and to avoid overwriting the\r
+> >> sub-part data notmuch checks and if part data is already recorded it\r
+> >> does not overwrite it.\r
+> >> \r
+> >> Now with lazy part handling this could fail: there is already part\r
+> >> data stored. In the common case it works as the part type information\r
+> >> was stored when the lazy-part button was inserted. However, this fails\r
+> >> if the lazy part has sub-parts: notmuch had no idea these existed\r
+> >> until the lazy part insertion.\r
+> >\r
+> > This says that things fail when a lazy part has sub-parts, but not\r
+> > what the failure is.  What is the failure?  Can you give a specific\r
+> > sequence of events and conditions that leads to and demonstrates the\r
+> > failure?\r
+> >\r
+> > (I ask not just for commit posterity, but because I actually don't\r
+> > know, though I may have figured it out after writing the comment\r
+> > below.)\r
+> \r
+> Hey, Austin.  Here's an example of a mail that is effected the issue:\r
+> \r
+> └┬╴multipart/alternative 896783 bytes\r
+>  ├─╴text/plain 379 bytes\r
+>  └┬╴multipart/related 892556 bytes\r
+>   ├─╴text/html 1236 bytes\r
+>   └─╴image/jpeg inline [photo.JPG] 890841 bytes\r
+> \r
+> The multipart/related part is initially hidden.  Without Istvan's patch,\r
+> there would be no button at all for the image/jpeg part, even when the\r
+> multipart/related is exposed.  With Istvan's patch the image/jpeg button\r
+> is there, but without Mark's patch the button would actually reference\r
+> the entire multipart/alternative part, instead of just the image/jpeg.\r
+> If I tried to save the image/jpeg I would get the entire\r
+> multipart/alternative mime structure in plain text.\r
+\r
+Ah.  Thanks for the example!  After staring at the patch for long\r
+enough, I figured it had to be something like this, but still didn't\r
+have anything concrete.  It would be great to include this in the\r
+commit message to show exactly what was broken and what's being fixed.\r
+\r
+Now that I'm sure what the problem was, the code itself LGTM.\r