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