Re: [PATCH] FIXED: Added better support for multiple structured output formats.
authorJameson Graef Rollins <jrollins@finestructure.net>
Tue, 10 Jul 2012 16:58:21 +0000 (09:58 +1700)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:48:08 +0000 (09:48 -0800)
b6/b6036d9627911278f5d98ab28f11784b22d098 [new file with mode: 0644]

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