Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / f6 / 7966c03d61e794697c402d38ec9270cc5ea3b7
1 Return-Path: <craven@gmx.net>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 5F126431FC2\r
6         for <notmuch@notmuchmail.org>; Mon, 23 Jul 2012 03:38:27 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0.001\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0.001 tagged_above=-999 required=5\r
12         tests=[FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001]\r
13         autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id aRn3L2cOB2XY for <notmuch@notmuchmail.org>;\r
17         Mon, 23 Jul 2012 03:38:25 -0700 (PDT)\r
18 Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.23])\r
19         by olra.theworths.org (Postfix) with SMTP id 30DEC431FC4\r
20         for <notmuch@notmuchmail.org>; Mon, 23 Jul 2012 03:38:22 -0700 (PDT)\r
21 Received: (qmail invoked by alias); 23 Jul 2012 10:38:16 -0000\r
22 Received: from gw.arelion.cust.net.lagis.at (EHLO dodekanex.arelion.at)\r
23         [83.164.197.182]\r
24         by mail.gmx.net (mp031) with SMTP; 23 Jul 2012 12:38:16 +0200\r
25 X-Authenticated: #201305\r
26 X-Provags-ID: V01U2FsdGVkX18W3nk9VzAWOkyRZ7d2BH0dr/pOH/nDBARUmc1+LB\r
27         SUC1rmGoyyXjs4\r
28 Received: by dodekanex.arelion.at (Postfix, from userid 1000)\r
29         id 91B323034D3; Mon, 23 Jul 2012 12:39:50 +0200 (CEST)\r
30 From: craven@gmx.net\r
31 To: notmuch@notmuchmail.org\r
32 Subject: [PATCH v8 0/3] notmuch-search: Structured Output Formatters\r
33 Date: Mon, 23 Jul 2012 12:39:43 +0200\r
34 Message-Id: <1343039986-2732-1-git-send-email-craven@gmx.net>\r
35 X-Mailer: git-send-email 1.7.11.2\r
36 X-Y-GMX-Trusted: 0\r
37 X-BeenThere: notmuch@notmuchmail.org\r
38 X-Mailman-Version: 2.1.13\r
39 Precedence: list\r
40 List-Id: "Use and development of the notmuch mail system."\r
41         <notmuch.notmuchmail.org>\r
42 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
43         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
44 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
45 List-Post: <mailto:notmuch@notmuchmail.org>\r
46 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
47 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
48         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
49 X-List-Received-Date: Mon, 23 Jul 2012 10:38:27 -0000\r
50 \r
51 From: <craven@gmx.net>\r
52 \r
53 Currently there is no easy way to add support for different structured\r
54 formatters (like JSON). For example, adding support for S-Expressions\r
55 would result in code duplication.\r
56 \r
57 This patch series amends the situation by introducing structured\r
58 formatters, which allow different implementations of structures like\r
59 lists, maps, strings and numbers.\r
60 \r
61 The new code in sprinter.h and sprinter-json.c can be used instead of\r
62 the current ad-hoc output in all parts of notmuch, a patch for\r
63 notmuch-search.c is included.\r
64 \r
65 In a later patch, all other parts of notmuch should be adapted to the\r
66 structured formatters, and the creation of formatters should be\r
67 centralised (to make adding new formatters easier).\r
68 \r
69 A "structured" formatter is provided for notmuch-search that prints the\r
70 current text format. This removes almost all the special-casing from\r
71 notmuch-search.c.\r
72 \r
73 Changes versus v7 of this patch:\r
74 - added {} around "else" blocks (as mentioned in\r
75   id:20120722160843.GC31834@mit.edu)\r
76 - added fallback to INTERNAL_ERROR (which should never be called) in\r
77   notmuch-search.c if format is unknown (as mentioned in\r
78   id:m2r4s694ly.fsf@guru.guru-group.fi).\r
79 \r
80 Summary: \r
81 \r
82 Peter Feigl (3):\r
83   Add support for structured output formatters.\r
84   Add structured output formatter for JSON and plain text (but don't\r
85     use them yet).\r
86   Use the structured formatters in notmuch-search.c.\r
87 \r
88  Makefile.local   |   2 +\r
89  notmuch-search.c | 304 ++++++++++++++---------------------------------\r
90  sprinter-json.c  | 187 +++++++++++++++++++++++++++++\r
91  sprinter-text.c  | 126 ++++++++++++++++++++\r
92  sprinter.h       |  68 +++++++++++\r
93  test/json        |  34 +++---\r
94  6 files changed, 489 insertions(+), 232 deletions(-)\r
95  create mode 100644 sprinter-json.c\r
96  create mode 100644 sprinter-text.c\r
97  create mode 100644 sprinter.h\r
98 \r
99 -- \r
100 1.7.11.2\r
101 \r