[PATCH] FIXED: Added better support for multiple structured output formats.

Jameson Graef Rollins jrollins at finestructure.net
Tue Jul 10 09:58:21 PDT 2012


On Tue, Jul 10 2012, craven at gmx.net wrote:
> Sorry, the original patch I sent was missing a small part, here the full
> patch:
>
> As discussed in <id:20120121220407.GK16740 at mit.edu>, 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120710/74c64ff7/attachment.pgp>


More information about the notmuch mailing list