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 EC499431FD0 for ; Mon, 16 May 2011 14:20:18 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] 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 nnW7d8o1Hn-H for ; Mon, 16 May 2011 14:20:18 -0700 (PDT) Received: from arlo.cworth.org (arlo.cworth.org [50.43.72.2]) by olra.theworths.org (Postfix) with ESMTP id 32E3D431FB6 for ; Mon, 16 May 2011 14:20:18 -0700 (PDT) Received: from yoom.home.cworth.org (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id E174C29A056; Mon, 16 May 2011 14:20:16 -0700 (PDT) Received: by yoom.home.cworth.org (Postfix, from userid 1000) id C7736254183; Mon, 16 May 2011 14:20:14 -0700 (PDT) From: Carl Worth To: Daniel Kahn Gillmor Subject: Re: MIME restructuring [was: Re: release-candidate/0.6] In-Reply-To: <4DD18DFE.7090206@fifthhorseman.net> References: <8762pn7gth.fsf@servo.factory.finestructure.net> <874o4zczr8.fsf@yoom.home.cworth.org> <87wrhvyqfn.fsf@servo.factory.finestructure.net> <87r57ybcna.fsf@yoom.home.cworth.org> <4DD18DFE.7090206@fifthhorseman.net> User-Agent: Notmuch/0.5 (http://notmuchmail.org) Emacs/23.3.1 (i486-pc-linux-gnu) Date: Mon, 16 May 2011 14:20:07 -0700 Message-ID: <87ei3ybawo.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Cc: Notmuch Mail 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: Mon, 16 May 2011 21:20:19 -0000 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Mon, 16 May 2011 16:50:06 -0400, Daniel Kahn Gillmor wrote: > So a message like this: >=20 > A=E2=94=94=E2=94=AC=E2=95=B4multipart/signed 355339 bytes > B =E2=94=9C=E2=94=AC=E2=95=B4multipart/mixed 353462 bytes > C =E2=94=82=E2=94=9C=E2=95=B4text/plain 235 bytes > D =E2=94=82=E2=94=94=E2=95=B4image/jpeg attachment [foo.jpg] 352752 bytes > E =E2=94=94=E2=95=B4application/pgp-signature attachment [signature.asc] = 1030 bytes I tried creating a message like that but mine came out slightly differently: > A=E2=94=94=E2=94=AC=E2=95=B4multipart/mixed > B =E2=94=9C=E2=94=AC=E2=95=B4multipart/signed > C =E2=94=82=E2=94=9C=E2=95=B4text/plain > D =E2=94=82=E2=94=94=E2=95=B4application/pgp-signature > E =E2=94=94=E2=95=B4application/octet-stream I'll have to learn better how to control the emacs mail composer in order to understand how to get signatures to cover attachments if I want to do that kind of thing. > would come out with three parts: >=20 > 1) C > 2) D > 3) E That is indeed the behavior I see with master (for both text and json output). > the new code assigns this message to 5 parts: >=20 > 1) A > 2) B > 3) C > 4) D > 5) E Interestingly, this is not quite the behavior I get (with commit 373f352). With --format=3Dtext I'm now seeing: 2) C 3) D 4) E and with --format=3Djson I'm seeing (I think this structure is right): 1) A 3) B 5) C 7) D 9) E So that explains some of my confusion. The behavioral change of this commit is really only impacting the json format, and not the text. That wasn't clear from the commit message (and I had only been doing my testing with the text backend). This seems to be justifying my fears about the code duplication---the two code paths are already divergent, (which means that things like notmuch part-number identifiers cannot be used between the different formats). I'd like to fix that by preventing the code duplication. Also, both paths seem to be suffering from some excess part-number incrementing somewhere. All of this should be easy to get right with a careful test case or two. =2DCarl --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk3RlQgACgkQ6JDdNq8qSWhXhACfSwbiYbc7Mtru+JM2/tvfoLE2 j1MAnjdHapGaRs5uDmPjdW0V8eOGc77L =+LYf -----END PGP SIGNATURE----- --=-=-=--