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 7FC31431FC3
\r
6 for <notmuch@notmuchmail.org>; Thu, 6 Dec 2012 14:30:07 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
8 X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"
\r
12 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
13 tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 vs7260780s4X for <notmuch@notmuchmail.org>;
\r
17 Thu, 6 Dec 2012 14:30:06 -0800 (PST)
\r
18 Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com
\r
19 [209.85.217.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
20 (No client certificate requested)
\r
21 by olra.theworths.org (Postfix) with ESMTPS id 5266D431FB6
\r
22 for <notmuch@notmuchmail.org>; Thu, 6 Dec 2012 14:30:06 -0800 (PST)
\r
23 Received: by mail-lb0-f181.google.com with SMTP id ge1so5963329lbb.26
\r
24 for <notmuch@notmuchmail.org>; Thu, 06 Dec 2012 14:30:05 -0800 (PST)
\r
25 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
\r
26 d=google.com; s=20120113;
\r
27 h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references
\r
28 :in-reply-to:references:x-gm-message-state;
\r
29 bh=E0nmYxZa4zj9OEgpzdGo0YLCcREbynpS29fF4iIyop0=;
\r
30 b=pq9zX7QsRsgLIOdq8h1hI4tXAOpWSNzX26rM+KSUFFqUVDlzLl5pqm91oxuFF8M1ho
\r
31 3X2W/Q/eBLpoQD/MbQ4m99dBDj2HVhT9vDhIyE0vNvNYmPzT6zyWnVJPwrnGEBL2azHS
\r
32 AB85fnbWHuIRuy9xPYpB21wuwvjtC2S4EE8ZDCdZuvaaM6mwjk3Z3x/iV4D9OFSTRUO1
\r
33 O3TIOK3a/yBwjtYgv6Ewnn33NVuPR+BhyMm/OvrrVkhk/2THY5BRkny3sjuVUSRcI5IV
\r
34 /kat3DqsAT0w3p4w/QH49ZO3rCi6i1iWud3ce4G2f9XKY2srB0mVbgGjArCYKdL5w6Uf
\r
36 Received: by 10.152.103.38 with SMTP id ft6mr3388055lab.40.1354833004855;
\r
37 Thu, 06 Dec 2012 14:30:04 -0800 (PST)
\r
38 Received: from localhost (dsl-hkibrasgw4-fe51df00-27.dhcp.inet.fi.
\r
40 by mx.google.com with ESMTPS id n7sm2533516lbg.3.2012.12.06.14.30.03
\r
41 (version=SSLv3 cipher=OTHER); Thu, 06 Dec 2012 14:30:04 -0800 (PST)
\r
42 From: Jani Nikula <jani@nikula.org>
\r
43 To: notmuch@notmuchmail.org
\r
44 Subject: [PATCH 2/2] cli: add --format=text0 to notmuch search
\r
45 Date: Fri, 7 Dec 2012 00:29:58 +0200
\r
47 <89998d45f1f14d580c51511a545cf9e399061e1f.1354832980.git.jani@nikula.org>
\r
48 X-Mailer: git-send-email 1.7.10.4
\r
50 <30f03a18ed10c221c13b6672f90654963c76452d.1354832980.git.jani@nikula.org>
\r
52 <30f03a18ed10c221c13b6672f90654963c76452d.1354832980.git.jani@nikula.org>
\r
54 <30f03a18ed10c221c13b6672f90654963c76452d.1354832980.git.jani@nikula.org>
\r
56 <30f03a18ed10c221c13b6672f90654963c76452d.1354832980.git.jani@nikula.org>
\r
58 ALoCoQkblPzSlPfNnX3LGA1O28R7qNd3SRrfJo5Re79eiKJ1lri651xdY+lIGV7wTbFcLTyf7/g2
\r
59 X-BeenThere: notmuch@notmuchmail.org
\r
60 X-Mailman-Version: 2.1.13
\r
62 List-Id: "Use and development of the notmuch mail system."
\r
63 <notmuch.notmuchmail.org>
\r
64 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
65 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
66 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
67 List-Post: <mailto:notmuch@notmuchmail.org>
\r
68 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
69 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
70 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
71 X-List-Received-Date: Thu, 06 Dec 2012 22:30:07 -0000
\r
73 Add new format text0, which is otherwise the same as text, but use the
\r
74 null character as separator instead of the newline character. This is
\r
75 similar to find(1) -print0 option, and works together with the
\r
78 notmuch-search.c | 11 +++++++++--
\r
79 1 file changed, 9 insertions(+), 2 deletions(-)
\r
81 diff --git a/notmuch-search.c b/notmuch-search.c
\r
82 index 830c4e4..cd02b1d 100644
\r
83 --- a/notmuch-search.c
\r
84 +++ b/notmuch-search.c
\r
85 @@ -305,8 +305,11 @@ notmuch_search_command (void *ctx, int argc, char *argv[])
\r
86 int exclude = EXCLUDE_TRUE;
\r
89 - enum { NOTMUCH_FORMAT_JSON, NOTMUCH_FORMAT_TEXT }
\r
90 - format_sel = NOTMUCH_FORMAT_TEXT;
\r
92 + NOTMUCH_FORMAT_JSON,
\r
93 + NOTMUCH_FORMAT_TEXT,
\r
94 + NOTMUCH_FORMAT_TEXT0,
\r
95 + } format_sel = NOTMUCH_FORMAT_TEXT;
\r
97 notmuch_opt_desc_t options[] = {
\r
98 { NOTMUCH_OPT_KEYWORD, &sort, "sort", 's',
\r
99 @@ -316,6 +319,7 @@ notmuch_search_command (void *ctx, int argc, char *argv[])
\r
100 { NOTMUCH_OPT_KEYWORD, &format_sel, "format", 'f',
\r
101 (notmuch_keyword_t []){ { "json", NOTMUCH_FORMAT_JSON },
\r
102 { "text", NOTMUCH_FORMAT_TEXT },
\r
103 + { "text0", NOTMUCH_FORMAT_TEXT0 },
\r
105 { NOTMUCH_OPT_KEYWORD, &output, "output", 'o',
\r
106 (notmuch_keyword_t []){ { "summary", OUTPUT_SUMMARY },
\r
107 @@ -344,6 +348,9 @@ notmuch_search_command (void *ctx, int argc, char *argv[])
\r
108 case NOTMUCH_FORMAT_TEXT:
\r
109 format = sprinter_text_create (ctx, stdout);
\r
111 + case NOTMUCH_FORMAT_TEXT0:
\r
112 + format = sprinter_text0_create (ctx, stdout);
\r
114 case NOTMUCH_FORMAT_JSON:
\r
115 format = sprinter_json_create (ctx, stdout);
\r