Notmuch scripts (again), now with more usenet

2012-07-16 Thread Daniel Schoepe
bed... Name: not available Type: application/pgp-signature Size: 835 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120716/2e56d9ab/attachment.pgp>

[PATCH v6 0/3] notmuch-reply: Structured Formatters

2012-07-16 Thread cra...@gmx.net
Currently there is no easy way to add support for different structured formatters (like JSON). For example, adding support for S-Expressions would result in code duplication. This patch series amends the situation by introducing structured formatters, which allow different implementations of

[PATCH v6 2/3] Add structured output formatter for JSON and plain text.

2012-07-16 Thread cra...@gmx.net
Using the new structured printer support in sprinter.h, implement sprinter_json_create, which returns a new JSON structured output formatter. The formatter prints output similar to the existing JSON, but with differences in whitespace (mostly newlines, --output=summary prints the entire message

[PATCH v6 1/3] Add support for structured output formatters.

2012-07-16 Thread cra...@gmx.net
This patch adds a new struct type sprinter_t, which is used for structured formatting, e.g. JSON or S-Expressions. The structure printer is heavily based on code from Austin Clements (id:87d34hsdx8.fsf at awakening.csail.mit.edu). It includes the following functions: /* Start a new

[PATCH v6 3/3] Use the structured formatters in notmuch-search.c.

2012-07-16 Thread cra...@gmx.net
This patch switches from the current ad-hoc printer to the structured formatters in sprinter.h, sprinter-text-search.c and sprinter-json.c. The JSON tests are changed slightly in order to make them PASS for the new structured output formatter. The text tests pass without adaptation. ---