--- /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 BEF6F431FB6\r
+ for <notmuch@notmuchmail.org>; Thu, 17 Oct 2013 04:47:34 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\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 XbcF1TyV2AfO for <notmuch@notmuchmail.org>;\r
+ Thu, 17 Oct 2013 04:47:23 -0700 (PDT)\r
+Received: from mail-ea0-f177.google.com (mail-ea0-f177.google.com\r
+ [209.85.215.177]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 30E29431FAE\r
+ for <notmuch@notmuchmail.org>; Thu, 17 Oct 2013 04:47:23 -0700 (PDT)\r
+Received: by mail-ea0-f177.google.com with SMTP id f15so979633eak.8\r
+ for <notmuch@notmuchmail.org>; Thu, 17 Oct 2013 04:47:21 -0700 (PDT)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+ d=1e100.net; s=20130820;\r
+ h=x-gm-message-state:from:to:subject:in-reply-to:references\r
+ :user-agent:date:message-id:mime-version:content-type;\r
+ bh=B970QI6SRCnOKyS28e/6ZhW7bPLP3SiQz7jxrPQwsLs=;\r
+ b=VsBNlZZKc2e+FfLWwGQmFs2J8bsSl8gTlzvBnmBzTnrUt3DGmOFnPGzddZZ8g6mJwO\r
+ CETZWCH7nRTApxuP8XfAxi6aKfxMQbJx5lrZ08HEnRvmVstJzTawvv/UD1UXGgjQeImZ\r
+ QTtBoV34Ndv3BnFRdNmzXZB5ieLdPOOIYCAY4IDIjpIOBAoH3FjN5tVtsqOC9jAhTaw2\r
+ 3bxhYn1h78qPBAKSGJct3gagUmwWhBY3INFDoSAf0AaJsI36U3fyxVdBrgxmP/sMd+Vx\r
+ ffq3sVOaj3vOjtipnWfr+68yiaZzxZyaecTiMYhQace1HQs1bKD0/ajEW8Spbns8OLxj\r
+ uNuA==\r
+X-Gm-Message-State:\r
+ ALoCoQlamfU1Ha3IaBISHMYecc0aSHOTBzObwt6CrmKbOmGfc1difjw17Vpfw7AkYFL/ffOYq5+Z\r
+X-Received: by 10.15.42.140 with SMTP id u12mr3821278eev.54.1382010440637;\r
+ Thu, 17 Oct 2013 04:47:20 -0700 (PDT)\r
+Received: from localhost (dsl-hkibrasgw2-58c36f-91.dhcp.inet.fi.\r
+ [88.195.111.91])\r
+ by mx.google.com with ESMTPSA id i1sm191863352eeg.0.1969.12.31.16.00.00\r
+ (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
+ Thu, 17 Oct 2013 04:47:19 -0700 (PDT)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: Mark Walters <markwalters1009@gmail.com>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH 2/6] cli: sanitize tabs to spaces in notmuch search\r
+In-Reply-To: <87ob6ob9rh.fsf@qmul.ac.uk>\r
+References: <cover.1381948853.git.jani@nikula.org>\r
+ <af8381b86275c4be77cc8527a19d69efbd2e9423.1381948853.git.jani@nikula.org>\r
+ <87ob6ob9rh.fsf@qmul.ac.uk>\r
+User-Agent: Notmuch/0.16+97~g6878b0b (http://notmuchmail.org) Emacs/24.3.1\r
+ (x86_64-pc-linux-gnu)\r
+Date: Thu, 17 Oct 2013 14:47:18 +0300\r
+Message-ID: <87k3hcqfuh.fsf@nikula.org>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\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, 17 Oct 2013 11:47:34 -0000\r
+\r
+On Thu, 17 Oct 2013, Mark Walters <markwalters1009@gmail.com> wrote:\r
+> Hi\r
+>\r
+> I have looked at the whole series and broadly it looks good. However, I\r
+> don't know this code so this is not a full review. I do have a few\r
+> comments: some of these may be plain wrong in which case my apologies!\r
+\r
+Thanks for the review!\r
+\r
+> On Wed, 16 Oct 2013, Jani Nikula <jani@nikula.org> wrote:\r
+>\r
+>> This is in preparation of switching to gmime header parsing, but\r
+>> arguably converting tabs to spaces rather than question marks is the\r
+>> right thing to do anyway.\r
+>> ---\r
+>\r
+> I think it would be worth saying in the commit message that this is only\r
+> for text summary output.\r
+\r
+Agreed.\r
+\r
+> Also why only tabs to spaces but \n to a '?'\r
+\r
+The notmuch header parser converts the tabs in header folding to spaces,\r
+gmime keeps them as tabs. AFAICT that is the only difference between\r
+headers indexed by notmuch and gmime, and causes tests to fail. So we do\r
+the tabs to spaces conversion here to produce same output from cli. This\r
+patch just does the minimal change required for tests to pass; other\r
+changes might be good too, but they were not relevant for this series.\r
+\r
+BR,\r
+Jani.\r
+\r
+>\r
+> Best wishes\r
+>\r
+> Mark\r
+>\r
+>\r
+>\r
+>\r
+>> notmuch-search.c | 4 +++-\r
+>> 1 file changed, 3 insertions(+), 1 deletion(-)\r
+>>\r
+>> diff --git a/notmuch-search.c b/notmuch-search.c\r
+>> index d9d39ec..eab314f 100644\r
+>> --- a/notmuch-search.c\r
+>> +++ b/notmuch-search.c\r
+>> @@ -40,7 +40,9 @@ sanitize_string (const void *ctx, const char *str)\r
+>> loop = out = talloc_strdup (ctx, str);\r
+>> \r
+>> for (; *loop; loop++) {\r
+>> - if ((unsigned char)(*loop) < 32)\r
+>> + if (*loop == '\t')\r
+>> + *loop = ' ';\r
+>> + else if ((unsigned char)(*loop) < 32)\r
+>> *loop = '?';\r
+>> }\r
+>> return out;\r
+>> -- \r
+>> 1.8.4.rc3\r
+>>\r
+>> _______________________________________________\r
+>> notmuch mailing list\r
+>> notmuch@notmuchmail.org\r
+>> http://notmuchmail.org/mailman/listinfo/notmuch\r