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 7BC55431E64 for ; Tue, 10 Jul 2012 09:58:29 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -2.29 X-Spam-Level: X-Spam-Status: No, score=-2.29 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_MED=-2.3, T_MIME_NO_TEXT=0.01] 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 KUyiQggz+RSM for ; Tue, 10 Jul 2012 09:58:29 -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 0C12D431FBF for ; Tue, 10 Jul 2012 09:58:29 -0700 (PDT) Received: from fire-doxen.imss.caltech.edu (localhost [127.0.0.1]) by fire-doxen-postvirus (Postfix) with ESMTP id 88E40328094; Tue, 10 Jul 2012 09:58:28 -0700 (PDT) X-Spam-Scanned: at Caltech-IMSS on fire-doxen by amavisd-new Received: from finestructure.net (adsl-76-240-184-246.dsl.irvnca.sbcglobal.net [76.240.184.246]) (Authenticated sender: jrollins) by fire-doxen-submit (Postfix) with ESMTP id 9A0AF2E5057E; Tue, 10 Jul 2012 09:58:25 -0700 (PDT) Received: by finestructure.net (Postfix, from userid 1000) id BD5B2868; Tue, 10 Jul 2012 09:58:24 -0700 (PDT) From: Jameson Graef Rollins To: craven@gmx.net, notmuch@notmuchmail.org Subject: Re: [PATCH] FIXED: Added better support for multiple structured output formats. In-Reply-To: <87fw8zvqmm.fsf@nexoid.at> References: <87liisue70.fsf@nexoid.at> <87fw8zvqmm.fsf@nexoid.at> User-Agent: Notmuch/0.13.2+54~ga0426dc (http://notmuchmail.org) Emacs/23.4.1 (x86_64-pc-linux-gnu) Date: Tue, 10 Jul 2012 09:58:21 -0700 Message-ID: <871ukjzh76.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: Tue, 10 Jul 2012 16:58:29 -0000 --=-=-= On Tue, Jul 10 2012, craven@gmx.net wrote: > Sorry, the original patch I sent was missing a small part, here the full > patch: > > As discussed in , this patch adds > support for new structured output formats (like s-expressions) by using > stateful structure_printers. An implementation of the JSON structure > printer that passes all tests is included. > > Structure printers have functions for starting a map, a list, closing > any number of these two, printing a map key, a number value, a string > value, and boolean values. By threading a state through the > invocations, arbitrary structured formatting can be achieved. > > In a second patch, the structured output code should be isolated in a > separate file, and also used in all other parts of notmuch. Hi, Peter. Thanks for submitting this. I would really like to see this patch broken up into multiple smaller and more atomic patches. Smaller patches are much easier to read and review. For instance, all the new formatting functions could be added in their own patch (and already in their own file if that's appropriate). Then the existing json output could then be modified to use the new formatters. There is also json output in notmuch show and reply as well, so they should probably also be modified to use the new formatter. Thanks! jamie. --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIcBAEBCAAGBQJP/F8tAAoJEO00zqvie6q8dFQP/2O4/dlWJsfLJfthyvy+D9eI RF7B9xELgo1gz/64BT33gd9+IVFWmdYc5MV/dmOYMlD8p96JFmEtS0bNTe1CDEL4 hO3O48B2jSnQk/NBLNM90N9hAvu9Q/1Jnt5k93DD+PKZlmirkE988Id/FXT7NU+g zmyjeWqNCGP6mzDYcVng6J2oX+JhTbG/1yXhItwCqFxa+lwVShQ+9a5wL14winSY tAu8AXxlIN406OIIpMhiT2nSROHq9HZnCxJJvrsTS6ebrg+dqNqy0qzKpXic5vqo 8NR8O/azNiJq3JaJeltMGQidyyt3y3lIT389uszj8Wv2XkwiKTLQToFRln5562Hx qRM4avz9oNEY+BdYNe1CsBKAA9O1kHsYRhJHO+3wk0nz3+ZYNDJnRT8pYLW4pFGx xghUYxsHVs+jUMze359diVA2r38voCdtOOSt/38fivaEq1M3MEMHsZeRAuul+ifu x+D0rB4u5iW/c2WituFuE5yNQZCUZYZGgQ1ppenq0BnD+kX3IeVjKwG1GJ404/VC LVEyZWg4yVQXhy7bL6T3JLcbej+oNQnGyg6CJZg6gdt8NR6HEfVTOb39oZmVab/S jm75eYbmq7MGEHChCK8fvJW3Cg3DzuszPTw9udpuSd19/JenaC8rGMTHk11IH+CF vH7AtjtimU+V44cWbLoB =wMZl -----END PGP SIGNATURE----- --=-=-=--