Re: [PATCH v4 02/16] Move crypto.c into libutil
[notmuch-archives.git] / 13 / 542f3cc4f757e122483c233efa264beefff9c3
1 Return-Path: <amdragon@mit.edu>\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 14B2C431FAF\r
6         for <notmuch@notmuchmail.org>; Sun, 22 Jul 2012 09:13:17 -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.7\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id 3zFopGbdRUsr for <notmuch@notmuchmail.org>;\r
16         Sun, 22 Jul 2012 09:13:16 -0700 (PDT)\r
17 Received: from dmz-mailsec-scanner-6.mit.edu (DMZ-MAILSEC-SCANNER-6.MIT.EDU\r
18         [18.7.68.35])\r
19         by olra.theworths.org (Postfix) with ESMTP id 91C5E431FAE\r
20         for <notmuch@notmuchmail.org>; Sun, 22 Jul 2012 09:13:16 -0700 (PDT)\r
21 X-AuditID: 12074423-b7f396d0000008f4-9f-500c269b540f\r
22 Received: from mailhub-auth-1.mit.edu ( [18.9.21.35])\r
23         by dmz-mailsec-scanner-6.mit.edu (Symantec Messaging Gateway) with SMTP\r
24         id 24.3E.02292.B962C005; Sun, 22 Jul 2012 12:13:15 -0400 (EDT)\r
25 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
26         by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id q6MGDFab011185; \r
27         Sun, 22 Jul 2012 12:13:15 -0400\r
28 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
29         (authenticated bits=0)\r
30         (User authenticated as amdragon@ATHENA.MIT.EDU)\r
31         by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q6MGDEMs004656\r
32         (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
33         Sun, 22 Jul 2012 12:13:15 -0400 (EDT)\r
34 Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77)\r
35         (envelope-from <amdragon@mit.edu>)\r
36         id 1SsymQ-0007FZ-5n; Sun, 22 Jul 2012 12:13:14 -0400\r
37 Date: Sun, 22 Jul 2012 12:13:13 -0400\r
38 From: Austin Clements <amdragon@MIT.EDU>\r
39 To: craven@gmx.net\r
40 Subject: Re: notmuch-reply: Structured Formatters\r
41 Message-ID: <20120722161313.GD31834@mit.edu>\r
42 References: <20120718194819.GP31670@mit.edu>\r
43         <1342766173-1344-1-git-send-email-craven@gmx.net>\r
44 MIME-Version: 1.0\r
45 Content-Type: text/plain; charset=us-ascii\r
46 Content-Disposition: inline\r
47 In-Reply-To: <1342766173-1344-1-git-send-email-craven@gmx.net>\r
48 User-Agent: Mutt/1.5.21 (2010-09-15)\r
49 X-Brightmail-Tracker:\r
50  H4sIAAAAAAAAA+NgFmpmleLIzCtJLcpLzFFi42IR4hRV1p2txhNgsHWKkcXehnZGi+s3ZzI7\r
51         MHks3rSfzePZqlvMAUxRXDYpqTmZZalF+nYJXBlbW7eyFxzhrXi407aB8Q1XFyMnh4SAicS7\r
52         O4dYIWwxiQv31rN1MXJxCAnsY5To+HAVytnAKHGkdxIjhHOSSeL8gstQmSWMEkv6N4H1swio\r
53         SqxoXcoCYrMJaEhs27+cEcQWERCSmPTlFVicWUBa4tvvZiYQW1jAUGLPzhXMIDavgI5E5/kG\r
54         sHohgQSJR2s+QcUFJU7OfALVqyVx499LoF4OsDnL/3GAhDkF7CTOH37BDmKLCqhITDm5jW0C\r
55         o9AsJN2zkHTPQuhewMi8ilE2JbdKNzcxM6c4NVm3ODkxLy+1SNdMLzezRC81pXQTIyis2V2U\r
56         dzD+Oah0iFGAg1GJh9fQnTtAiDWxrLgy9xCjJAeTkijvCmmeACG+pPyUyozE4oz4otKc1OJD\r
57         jBIczEoivJevA5XzpiRWVqUW5cOkpDlYlMR5r6Xc9BcSSE8sSc1OTS1ILYLJynBwKEnwnlQF\r
58         GipYlJqeWpGWmVOCkGbi4AQZzgM0/C5IDW9xQWJucWY6RP4Uo6KUOO8ukIQASCKjNA+uF5Z2\r
59         XjGKA70izLsCpIoHmLLgul8BDWYCGiydxQUyuCQRISXVwHjKvyt11f2Sj2Kr0jSX/f3q5n1g\r
60         xm3t10u6vu7mOFcuXa/V3HIvak/c4tmMzqa/7FWy7+tn6XsvPpmp0XC+sahwRjWj5omzoemB\r
61         l2U9Z+w4N62j5+p5Be1NdipbnpoLu51lXt+nuSP2UHVTi5LW/Qbmw2/+Xr9+eM/ir/7dE/tM\r
62         F9+53hA9dZYSS3FGoqEWc1FxIgCP+2wbFgMAAA==\r
63 Cc: notmuch@notmuchmail.org\r
64 X-BeenThere: notmuch@notmuchmail.org\r
65 X-Mailman-Version: 2.1.13\r
66 Precedence: list\r
67 List-Id: "Use and development of the notmuch mail system."\r
68         <notmuch.notmuchmail.org>\r
69 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
70         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
71 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
72 List-Post: <mailto:notmuch@notmuchmail.org>\r
73 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
74 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
75         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
76 X-List-Received-Date: Sun, 22 Jul 2012 16:13:17 -0000\r
77 \r
78 LGTM!  This is a great cleanup and I'm looking forward to S-expression\r
79 support.\r
80 \r
81 Quoth craven@gmx.net on Jul 20 at  8:36 am:\r
82 > Currently there is no easy way to add support for different structured\r
83 > formatters (like JSON). For example, adding support for S-Expressions\r
84 > would result in code duplication.\r
85\r
86 > This patch series amends the situation by introducing structured\r
87 > formatters, which allow different implementations of structures like\r
88 > lists, maps, strings and numbers.\r
89\r
90 > The new code in sprinter.h and sprinter-json.c can be used instead of\r
91 > the current ad-hoc output in all parts of notmuch, a patch for\r
92 > notmuch-search.c is included.\r
93\r
94 > In a later patch, all other parts of notmuch should be adapted to the\r
95 > structured formatters, and the creation of formatters should be\r
96 > centralised (to make adding new formatters easier).\r
97\r
98 > A "structured" formatter is provided for notmuch-search that prints the\r
99 > current text format. This removes almost all the special-casing from\r
100 > notmuch-search.c.\r
101\r
102 > Overall diff --stat:\r
103\r
104 >  Makefile.local   |   2 +\r
105 >  notmuch-search.c | 301 +++++++++++++----------------------------------\r
106 >  sprinter-json.c  | 185 +++++++++++++++++++++++++++++\r
107 >  sprinter-text.c  | 126 ++++++++++++++++++++\r
108 >  sprinter.h       |  68 +++++++++++\r
109 >  test/json        |  34 +++---\r
110 >  6 files changed, 484 insertions(+), 232 deletions(-)\r
111\r
112 > Changes versus v6 of this patch:\r
113 > - is_text_printer is now a field, not a function.\r
114 > - minor formatting\r
115 > - sprinter_text_search has been renamed to sprinter_text (as it contains\r
116 >   no search-specific code).\r
117 > - string sanitization removed from sprinter_text, the caller should\r
118 >   sanitize the strings.\r