1 Return-Path: <jani@nikula.org>
\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 75ADE431FBC
\r
6 for <notmuch@notmuchmail.org>; Fri, 30 Nov 2012 10:04:43 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\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 EvZCYwooa7gn for <notmuch@notmuchmail.org>;
\r
16 Fri, 30 Nov 2012 10:04:39 -0800 (PST)
\r
17 Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com
\r
18 [209.85.217.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
19 (No client certificate requested)
\r
20 by olra.theworths.org (Postfix) with ESMTPS id 39103431FAF
\r
21 for <notmuch@notmuchmail.org>; Fri, 30 Nov 2012 10:04:39 -0800 (PST)
\r
22 Received: by mail-lb0-f181.google.com with SMTP id ge1so740710lbb.26
\r
23 for <notmuch@notmuchmail.org>; Fri, 30 Nov 2012 10:04:37 -0800 (PST)
\r
24 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
\r
25 d=google.com; s=20120113;
\r
26 h=from:to:subject:in-reply-to:references:user-agent:date:message-id
\r
27 :mime-version:content-type:x-gm-message-state;
\r
28 bh=wW5Cd3bHNBIq8EXj2k75xus21IBHYtxFHmjU9nmJ6RE=;
\r
29 b=n+EMKi4s6xCswIjQIbU+olqtLZmnIQ/6I164WfccLZ12V86HFWhcWSn5+5clHSS2g3
\r
30 xIAh6nvn6tBr0vDAe9e9K9MJpa+K9P/68rt8GfA8xalZLPcK6Hg0Wdr8jxoxMmu7iU7v
\r
31 aT2aa/1Q8MKGPuUW3RGFjyAeYJmXe3W2M9q6jUuiWUL31Nn3OT0ceHE2qh2F1FQ6acmL
\r
32 YsFdGw6sA4INxlPqBHK+e2ndSxjBkwGfwX3xa3nniJm5FuMXkEdgYB5UWcb5uArEOqzO
\r
33 aXagzPRWnLVDxvf7HZ4QmUG0PDMFz9YOeQjBJ0+8gEUAAiqmCcMJk9+rVfT5KyOPO8tf
\r
35 Received: by 10.112.24.170 with SMTP id v10mr1156462lbf.88.1354298677630;
\r
36 Fri, 30 Nov 2012 10:04:37 -0800 (PST)
\r
37 Received: from localhost (dsl-hkibrasgw4-fe51df00-27.dhcp.inet.fi.
\r
39 by mx.google.com with ESMTPS id pw17sm2255462lab.5.2012.11.30.10.04.35
\r
40 (version=SSLv3 cipher=OTHER); Fri, 30 Nov 2012 10:04:36 -0800 (PST)
\r
41 From: Jani Nikula <jani@nikula.org>
\r
42 To: Peter Feigl <craven@gmx.net>, notmuch@notmuchmail.org
\r
43 Subject: Re: [PATCH 2/3] Use the S-Expression structured printer for notmuch
\r
45 In-Reply-To: <1354264143-30173-2-git-send-email-craven@gmx.net>
\r
46 References: <1354264143-30173-1-git-send-email-craven@gmx.net>
\r
47 <1354264143-30173-2-git-send-email-craven@gmx.net>
\r
48 User-Agent: Notmuch/0.14+124~g3b17402 (http://notmuchmail.org) Emacs/23.4.1
\r
50 Date: Fri, 30 Nov 2012 20:04:34 +0200
\r
51 Message-ID: <87624nj7bh.fsf@nikula.org>
\r
53 Content-Type: text/plain; charset=us-ascii
\r
55 ALoCoQlQPLdQtDeMYgWURUEWHfDbuTXkuFks3OzOFzZZkuDz+FYxQ4PbbFB6CEXTFFyWIOiBjU1J
\r
56 X-BeenThere: notmuch@notmuchmail.org
\r
57 X-Mailman-Version: 2.1.13
\r
59 List-Id: "Use and development of the notmuch mail system."
\r
60 <notmuch.notmuchmail.org>
\r
61 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
62 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
63 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
64 List-Post: <mailto:notmuch@notmuchmail.org>
\r
65 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
66 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
67 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
68 X-List-Received-Date: Fri, 30 Nov 2012 18:04:43 -0000
\r
70 On Fri, 30 Nov 2012, Peter Feigl <craven@gmx.net> wrote:
\r
71 > This commit adds support for --format=sexp to notmuch search.
\r
73 > notmuch-search.c | 6 +++++-
\r
74 > sprinter.h | 4 ++++
\r
75 > 2 files changed, 9 insertions(+), 1 deletion(-)
\r
77 > diff --git a/notmuch-search.c b/notmuch-search.c
\r
78 > index 830c4e4..6218622 100644
\r
79 > --- a/notmuch-search.c
\r
80 > +++ b/notmuch-search.c
\r
81 > @@ -305,7 +305,7 @@ notmuch_search_command (void *ctx, int argc, char *argv[])
\r
82 > int exclude = EXCLUDE_TRUE;
\r
85 > - enum { NOTMUCH_FORMAT_JSON, NOTMUCH_FORMAT_TEXT }
\r
86 > + enum { NOTMUCH_FORMAT_JSON, NOTMUCH_FORMAT_TEXT, NOTMUCH_FORMAT_SEXP }
\r
87 > format_sel = NOTMUCH_FORMAT_TEXT;
\r
89 > notmuch_opt_desc_t options[] = {
\r
90 > @@ -315,6 +315,7 @@ notmuch_search_command (void *ctx, int argc, char *argv[])
\r
92 > { NOTMUCH_OPT_KEYWORD, &format_sel, "format", 'f',
\r
93 > (notmuch_keyword_t []){ { "json", NOTMUCH_FORMAT_JSON },
\r
94 > + { "sexp", NOTMUCH_FORMAT_SEXP },
\r
95 > { "text", NOTMUCH_FORMAT_TEXT },
\r
97 > { NOTMUCH_OPT_KEYWORD, &output, "output", 'o',
\r
98 > @@ -347,6 +348,9 @@ notmuch_search_command (void *ctx, int argc, char *argv[])
\r
99 > case NOTMUCH_FORMAT_JSON:
\r
100 > format = sprinter_json_create (ctx, stdout);
\r
102 > + case NOTMUCH_FORMAT_SEXP:
\r
103 > + format = sprinter_sexp_create (ctx, stdout);
\r
106 > /* this should never happen */
\r
107 > INTERNAL_ERROR("no output format selected");
\r
108 > diff --git a/sprinter.h b/sprinter.h
\r
109 > index 912a526..59776a9 100644
\r
112 > @@ -70,4 +70,8 @@ sprinter_text_create (const void *ctx, FILE *stream);
\r
113 > struct sprinter *
\r
114 > sprinter_json_create (const void *ctx, FILE *stream);
\r
116 > +/* Create a new structure printer that emits S-Expressions. */
\r
117 > +struct sprinter *
\r
118 > +sprinter_sexp_create (const void *ctx, FILE *stream);
\r
121 This hunk belongs to patch 1/3. Otherwise LGTM.
\r
127 > #endif // NOTMUCH_SPRINTER_H
\r
131 > _______________________________________________
\r
132 > notmuch mailing list
\r
133 > notmuch@notmuchmail.org
\r
134 > http://notmuchmail.org/mailman/listinfo/notmuch
\r