[PATCH 4/8] lib: extend private string map API with iterators
[notmuch-archives.git] / 20 / 7aa45c534282656b6d5fbdf3a35312d96f6437
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 9733B431FAE\r
6         for <notmuch@notmuchmail.org>; Fri, 13 Jul 2012 01:13:42 -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 z50e54vDTPqu for <notmuch@notmuchmail.org>;\r
17         Fri, 13 Jul 2012 01:13:40 -0700 (PDT)\r
18 Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.22])\r
19         by olra.theworths.org (Postfix) with SMTP id 3E3A4431FC3\r
20         for <notmuch@notmuchmail.org>; Fri, 13 Jul 2012 01:13:39 -0700 (PDT)\r
21 Received: (qmail invoked by alias); 13 Jul 2012 08:13:36 -0000\r
22 Received: from cm56-137-203.liwest.at (EHLO nexork.localdomain)\r
23  [86.56.137.203]        by mail.gmx.net (mp032) with SMTP; 13 Jul 2012 10:13:36 +0200\r
24 X-Authenticated: #201305\r
25 X-Provags-ID: V01U2FsdGVkX1/5F15BT5z551ssTzEHrq20STEwd2BcyXuKZgG0aZ\r
26         lXqfDORnr1Ek2X\r
27 Received: by nexork.localdomain (Postfix, from userid 1000)\r
28         id 8AE294527800; Fri, 13 Jul 2012 10:11:42 +0200 (CEST)\r
29 From: Peter Feigl <craven@gmx.net>\r
30 To: notmuch@notmuchmail.org\r
31 Subject: [PATCH v5 0/3] notmuch-reply: Structured Formatters\r
32 Date: Fri, 13 Jul 2012 10:11:34 +0200\r
33 Message-Id: <1342167097-25012-1-git-send-email-craven@gmx.net>\r
34 X-Mailer: git-send-email 1.7.11.1\r
35 In-Reply-To: <20120710191331.GE7332@mit.edu>\r
36 References: <20120710191331.GE7332@mit.edu>\r
37 X-Y-GMX-Trusted: 0\r
38 X-BeenThere: notmuch@notmuchmail.org\r
39 X-Mailman-Version: 2.1.13\r
40 Precedence: list\r
41 List-Id: "Use and development of the notmuch mail system."\r
42         <notmuch.notmuchmail.org>\r
43 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
44         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
45 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
46 List-Post: <mailto:notmuch@notmuchmail.org>\r
47 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
48 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
49         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
50 X-List-Received-Date: Fri, 13 Jul 2012 08:13:43 -0000\r
51 \r
52 Currently there is no easy way to add support for different structured\r
53 formatters (like JSON). For example, adding support for S-Expressions\r
54 would result in code duplication.\r
55 \r
56 This patch series amends the situation by introducing structured\r
57 formatters, which allow different implementations of structures like\r
58 lists, maps, strings and numbers.\r
59 \r
60 The new code in sprinter.h and sprinter-json.c can be used instead of\r
61 the current ad-hoc output in all parts of notmuch, a patch for\r
62 notmuch-search.c is included.\r
63 \r
64 In a later patch, all other parts of notmuch should be adapted to the\r
65 structured formatters, and the creation of formatters should be\r
66 centralised (to make adding new formatters easier).\r
67 \r
68 A "structured" formatter is provided for notmuch-search that prints the\r
69 current text format. This removes all special-casing from\r
70 notmuch-search.c, only structured output is used (and the formatter\r
71 discards unnecessary parts or introduces extra formatting).\r
72 \r