From: Jameson Graef Rollins Date: Sun, 1 Sep 2013 16:18:35 +0000 (+1700) Subject: Re: [PATCH] emacs: show: lazy part bugfix X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=346af60aada7e7a3dab4e4807fb231b157a5eb87;p=notmuch-archives.git Re: [PATCH] emacs: show: lazy part bugfix --- diff --git a/f1/4f131bca2a004fb27340183f96eea41e5241b3 b/f1/4f131bca2a004fb27340183f96eea41e5241b3 new file mode 100644 index 000000000..68e42b006 --- /dev/null +++ b/f1/4f131bca2a004fb27340183f96eea41e5241b3 @@ -0,0 +1,128 @@ +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 1D98A431FBC + for ; Sun, 1 Sep 2013 09:18:55 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -2.3 +X-Spam-Level: +X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5 + tests=[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 Cu-pKHWVXGL7 for ; + Sun, 1 Sep 2013 09:18:47 -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 AAF4C431FC0 + for ; Sun, 1 Sep 2013 09:18:47 -0700 (PDT) +Received: from earth-doxen.imss.caltech.edu (localhost [127.0.0.1]) + by earth-doxen-postvirus (Postfix) with ESMTP id 3019866E0195; + Sun, 1 Sep 2013 09:18:45 -0700 (PDT) +X-Spam-Scanned: at Caltech-IMSS on earth-doxen by amavisd-new +Received: from finestructure.net (cpe-76-173-75-27.socal.res.rr.com + [76.173.75.27]) (Authenticated sender: jrollins) + by earth-doxen-submit (Postfix) with ESMTP id 27BE666E01A6; + Sun, 1 Sep 2013 09:18:40 -0700 (PDT) +Received: by finestructure.net (Postfix, from userid 1000) + id 93EDF60088; Sun, 1 Sep 2013 09:18:37 -0700 (PDT) +From: Jameson Graef Rollins +To: Mark Walters , notmuch@notmuchmail.org, + amdragon@MIT.EDU +Subject: Re: [PATCH] emacs: show: lazy part bugfix +In-Reply-To: <1377246875-7784-1-git-send-email-markwalters1009@gmail.com> +References: <1377246875-7784-1-git-send-email-markwalters1009@gmail.com> +User-Agent: Notmuch/0.16+1~g9f861e2 (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-pc-linux-gnu) +Date: Sun, 01 Sep 2013 09:18:35 -0700 +Message-ID: <871u58a52c.fsf@servo.finestructure.net> +MIME-Version: 1.0 +Content-Type: multipart/signed; boundary="=-=-="; + micalg=pgp-sha256; protocol="application/pgp-signature" +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: Sun, 01 Sep 2013 16:18:55 -0000 + +--=-=-= +Content-Type: text/plain +Content-Transfer-Encoding: quoted-printable + +On Fri, Aug 23 2013, Mark Walters wrote: +> The lazy part handling had a subtle bug. Notmuch stores the part +> information as a text property with the displayed part so attachment +> handling (saving viewing etc work). +> +> 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. +> +> We fix this by removing any existing part-information from the +> relevant region before doing the lazy insertion. +> --- +> This was shown up by Istvan's patch in id:m3r4dtgz9k.fsf@zsu.kismala.com = +and=20 +> the bug found by Jamie in id:87fvu4fl25.fsf@servo.finestructure.net +> +> I think this is essentially the right patch: I am not certain about +> the +1 in the removing the property. It seems to be needed but maybe +> something with front/back sticky would be better. +> +> Also this definitely needs more testing before going into master: this +> code is definitely fragile. + +Hey, Mark. I have just tested this patch and it seems to be fixing the +issue I was seeing. With Istvan's patch the once hidden parts are now +exposed with buttons, and with this patch the buttons now work as +expected. + +I can't really speak to the correctness of this patch, but it does seem +to be working, and doesn't seem to have any adverse side effects that I +can see. + +As a reminder, this patch and Istvan's do fix an actual bug in notmuch, +so both should be pushed unless anyone see's anything wrong with either +of them. + +Thanks so much for the fixes, guys. + +jamie. + +--=-=-= +Content-Type: application/pgp-signature + +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.14 (GNU/Linux) + +iQIcBAEBCAAGBQJSI2jbAAoJEO00zqvie6q8NKEQALkAsW0q5KT9Ata/LJVLaUaO +NHre3YBLR08QbiBAOr2Ey5hQBx06dswsxXUMD+WesgADSwN0+cS52MTnMtVW5evY +62FYCWiu4pRsyCnBk0PgbmaYbrnu2UPaz7HmJiT2pFCa2S6TVrsoEilnJOUjCTaz +eULUbfxIM3SesbJsZmIoU1pj9r7CwtYRuMm1gFes8TK0d+39f8jmQSKAMviF4iN7 +1E2DaN/t6IQH2OYWRIGmuXT0hJ9/nw4CRIEsYT54QEvyIf06OKIW3wHZY7Stu42W +VoIqi2/IjCjI/BM0Ai2JRANXYKOUoObU2CUBpgf83f/x6Kudp1H714H5jL87eOB4 +3wMrVR+qDGT09L/ckQmPpDZ0a6iyCkINxKKR7NNJbe2dfGOvfek+du3VGbax0HSG +NOv5CSIaZbV/Ed9vfPWgFwVmnZSZmutN4AvRjMyNFcIJzZOE3QhRFPJYIOKldxK4 +4vNb+pqja7XlC7rcqJ46uZEAT84kb6EifvB7VM30u2kqkNndGcx+IIF0MctBXn2P +QbXXEWdQfG6JARcpuBTmaoDbrLtyhh8ZGXxXMxY9wDdNeEW8fzR7GcPW91U/y0bN +7tj0g856qpHmU+2+hF/v271tVtipAF67i7ktfiXPp+w9ZRcz/ThAGG/Z9dNQvIT3 +qzCKGKCE92F87BQ5GSeg +=EMOu +-----END PGP SIGNATURE----- +--=-=-=--