--- /dev/null
+Return-Path: <jani@nikula.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 7FC31431FC3\r
+ for <notmuch@notmuchmail.org>; Thu, 6 Dec 2012 14:30:07 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+ tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id vs7260780s4X for <notmuch@notmuchmail.org>;\r
+ Thu, 6 Dec 2012 14:30:06 -0800 (PST)\r
+Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com\r
+ [209.85.217.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 5266D431FB6\r
+ for <notmuch@notmuchmail.org>; Thu, 6 Dec 2012 14:30:06 -0800 (PST)\r
+Received: by mail-lb0-f181.google.com with SMTP id ge1so5963329lbb.26\r
+ for <notmuch@notmuchmail.org>; Thu, 06 Dec 2012 14:30:05 -0800 (PST)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+ d=google.com; s=20120113;\r
+ h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references\r
+ :in-reply-to:references:x-gm-message-state;\r
+ bh=E0nmYxZa4zj9OEgpzdGo0YLCcREbynpS29fF4iIyop0=;\r
+ b=pq9zX7QsRsgLIOdq8h1hI4tXAOpWSNzX26rM+KSUFFqUVDlzLl5pqm91oxuFF8M1ho\r
+ 3X2W/Q/eBLpoQD/MbQ4m99dBDj2HVhT9vDhIyE0vNvNYmPzT6zyWnVJPwrnGEBL2azHS\r
+ AB85fnbWHuIRuy9xPYpB21wuwvjtC2S4EE8ZDCdZuvaaM6mwjk3Z3x/iV4D9OFSTRUO1\r
+ O3TIOK3a/yBwjtYgv6Ewnn33NVuPR+BhyMm/OvrrVkhk/2THY5BRkny3sjuVUSRcI5IV\r
+ /kat3DqsAT0w3p4w/QH49ZO3rCi6i1iWud3ce4G2f9XKY2srB0mVbgGjArCYKdL5w6Uf\r
+ 9+1w==\r
+Received: by 10.152.103.38 with SMTP id ft6mr3388055lab.40.1354833004855;\r
+ Thu, 06 Dec 2012 14:30:04 -0800 (PST)\r
+Received: from localhost (dsl-hkibrasgw4-fe51df00-27.dhcp.inet.fi.\r
+ [80.223.81.27])\r
+ by mx.google.com with ESMTPS id n7sm2533516lbg.3.2012.12.06.14.30.03\r
+ (version=SSLv3 cipher=OTHER); Thu, 06 Dec 2012 14:30:04 -0800 (PST)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 2/2] cli: add --format=text0 to notmuch search\r
+Date: Fri, 7 Dec 2012 00:29:58 +0200\r
+Message-Id:\r
+ <89998d45f1f14d580c51511a545cf9e399061e1f.1354832980.git.jani@nikula.org>\r
+X-Mailer: git-send-email 1.7.10.4\r
+In-Reply-To:\r
+ <30f03a18ed10c221c13b6672f90654963c76452d.1354832980.git.jani@nikula.org>\r
+References:\r
+ <30f03a18ed10c221c13b6672f90654963c76452d.1354832980.git.jani@nikula.org>\r
+In-Reply-To:\r
+ <30f03a18ed10c221c13b6672f90654963c76452d.1354832980.git.jani@nikula.org>\r
+References:\r
+ <30f03a18ed10c221c13b6672f90654963c76452d.1354832980.git.jani@nikula.org>\r
+X-Gm-Message-State:\r
+ ALoCoQkblPzSlPfNnX3LGA1O28R7qNd3SRrfJo5Re79eiKJ1lri651xdY+lIGV7wTbFcLTyf7/g2\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Thu, 06 Dec 2012 22:30:07 -0000\r
+\r
+Add new format text0, which is otherwise the same as text, but use the\r
+null character as separator instead of the newline character. This is\r
+similar to find(1) -print0 option, and works together with the\r
+xargs(1) -0 option.\r
+---\r
+ notmuch-search.c | 11 +++++++++--\r
+ 1 file changed, 9 insertions(+), 2 deletions(-)\r
+\r
+diff --git a/notmuch-search.c b/notmuch-search.c\r
+index 830c4e4..cd02b1d 100644\r
+--- a/notmuch-search.c\r
++++ b/notmuch-search.c\r
+@@ -305,8 +305,11 @@ notmuch_search_command (void *ctx, int argc, char *argv[])\r
+ int exclude = EXCLUDE_TRUE;\r
+ unsigned int i;\r
+ \r
+- enum { NOTMUCH_FORMAT_JSON, NOTMUCH_FORMAT_TEXT }\r
+- format_sel = NOTMUCH_FORMAT_TEXT;\r
++ enum {\r
++ NOTMUCH_FORMAT_JSON,\r
++ NOTMUCH_FORMAT_TEXT,\r
++ NOTMUCH_FORMAT_TEXT0,\r
++ } format_sel = NOTMUCH_FORMAT_TEXT;\r
+ \r
+ notmuch_opt_desc_t options[] = {\r
+ { NOTMUCH_OPT_KEYWORD, &sort, "sort", 's',\r
+@@ -316,6 +319,7 @@ notmuch_search_command (void *ctx, int argc, char *argv[])\r
+ { NOTMUCH_OPT_KEYWORD, &format_sel, "format", 'f',\r
+ (notmuch_keyword_t []){ { "json", NOTMUCH_FORMAT_JSON },\r
+ { "text", NOTMUCH_FORMAT_TEXT },\r
++ { "text0", NOTMUCH_FORMAT_TEXT0 },\r
+ { 0, 0 } } },\r
+ { NOTMUCH_OPT_KEYWORD, &output, "output", 'o',\r
+ (notmuch_keyword_t []){ { "summary", OUTPUT_SUMMARY },\r
+@@ -344,6 +348,9 @@ notmuch_search_command (void *ctx, int argc, char *argv[])\r
+ case NOTMUCH_FORMAT_TEXT:\r
+ format = sprinter_text_create (ctx, stdout);\r
+ break;\r
++ case NOTMUCH_FORMAT_TEXT0:\r
++ format = sprinter_text0_create (ctx, stdout);\r
++ break;\r
+ case NOTMUCH_FORMAT_JSON:\r
+ format = sprinter_json_create (ctx, stdout);\r
+ break;\r
+-- \r
+1.7.10.4\r
+\r