Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 0e / 17d9125342573a219bd5a1188d83ffd2531e98
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 BEF6F431FB6\r
6         for <notmuch@notmuchmail.org>; Thu, 17 Oct 2013 04:47:34 -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 XbcF1TyV2AfO for <notmuch@notmuchmail.org>;\r
16         Thu, 17 Oct 2013 04:47:23 -0700 (PDT)\r
17 Received: from mail-ea0-f177.google.com (mail-ea0-f177.google.com\r
18         [209.85.215.177]) (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 30E29431FAE\r
21         for <notmuch@notmuchmail.org>; Thu, 17 Oct 2013 04:47:23 -0700 (PDT)\r
22 Received: by mail-ea0-f177.google.com with SMTP id f15so979633eak.8\r
23         for <notmuch@notmuchmail.org>; Thu, 17 Oct 2013 04:47:21 -0700 (PDT)\r
24 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
25         d=1e100.net; s=20130820;\r
26         h=x-gm-message-state:from:to:subject:in-reply-to:references\r
27         :user-agent:date:message-id:mime-version:content-type;\r
28         bh=B970QI6SRCnOKyS28e/6ZhW7bPLP3SiQz7jxrPQwsLs=;\r
29         b=VsBNlZZKc2e+FfLWwGQmFs2J8bsSl8gTlzvBnmBzTnrUt3DGmOFnPGzddZZ8g6mJwO\r
30         CETZWCH7nRTApxuP8XfAxi6aKfxMQbJx5lrZ08HEnRvmVstJzTawvv/UD1UXGgjQeImZ\r
31         QTtBoV34Ndv3BnFRdNmzXZB5ieLdPOOIYCAY4IDIjpIOBAoH3FjN5tVtsqOC9jAhTaw2\r
32         3bxhYn1h78qPBAKSGJct3gagUmwWhBY3INFDoSAf0AaJsI36U3fyxVdBrgxmP/sMd+Vx\r
33         ffq3sVOaj3vOjtipnWfr+68yiaZzxZyaecTiMYhQace1HQs1bKD0/ajEW8Spbns8OLxj\r
34         uNuA==\r
35 X-Gm-Message-State:\r
36  ALoCoQlamfU1Ha3IaBISHMYecc0aSHOTBzObwt6CrmKbOmGfc1difjw17Vpfw7AkYFL/ffOYq5+Z\r
37 X-Received: by 10.15.42.140 with SMTP id u12mr3821278eev.54.1382010440637;\r
38         Thu, 17 Oct 2013 04:47:20 -0700 (PDT)\r
39 Received: from localhost (dsl-hkibrasgw2-58c36f-91.dhcp.inet.fi.\r
40         [88.195.111.91])\r
41         by mx.google.com with ESMTPSA id i1sm191863352eeg.0.1969.12.31.16.00.00\r
42         (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
43         Thu, 17 Oct 2013 04:47:19 -0700 (PDT)\r
44 From: Jani Nikula <jani@nikula.org>\r
45 To: Mark Walters <markwalters1009@gmail.com>, notmuch@notmuchmail.org\r
46 Subject: Re: [PATCH 2/6] cli: sanitize tabs to spaces in notmuch search\r
47 In-Reply-To: <87ob6ob9rh.fsf@qmul.ac.uk>\r
48 References: <cover.1381948853.git.jani@nikula.org>\r
49         <af8381b86275c4be77cc8527a19d69efbd2e9423.1381948853.git.jani@nikula.org>\r
50         <87ob6ob9rh.fsf@qmul.ac.uk>\r
51 User-Agent: Notmuch/0.16+97~g6878b0b (http://notmuchmail.org) Emacs/24.3.1\r
52         (x86_64-pc-linux-gnu)\r
53 Date: Thu, 17 Oct 2013 14:47:18 +0300\r
54 Message-ID: <87k3hcqfuh.fsf@nikula.org>\r
55 MIME-Version: 1.0\r
56 Content-Type: text/plain\r
57 X-BeenThere: notmuch@notmuchmail.org\r
58 X-Mailman-Version: 2.1.13\r
59 Precedence: list\r
60 List-Id: "Use and development of the notmuch mail system."\r
61         <notmuch.notmuchmail.org>\r
62 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
63         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
64 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
65 List-Post: <mailto:notmuch@notmuchmail.org>\r
66 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
67 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
68         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
69 X-List-Received-Date: Thu, 17 Oct 2013 11:47:34 -0000\r
70 \r
71 On Thu, 17 Oct 2013, Mark Walters <markwalters1009@gmail.com> wrote:\r
72 > Hi\r
73 >\r
74 > I have looked at the whole series and broadly it looks good. However, I\r
75 > don't know this code so this is not a full review. I do have a few\r
76 > comments: some of these may be plain wrong in which case my apologies!\r
77 \r
78 Thanks for the review!\r
79 \r
80 > On Wed, 16 Oct 2013, Jani Nikula <jani@nikula.org> wrote:\r
81 >\r
82 >> This is in preparation of switching to gmime header parsing, but\r
83 >> arguably converting tabs to spaces rather than question marks is the\r
84 >> right thing to do anyway.\r
85 >> ---\r
86 >\r
87 > I think it would be worth saying in the commit message that this is only\r
88 > for text summary output.\r
89 \r
90 Agreed.\r
91 \r
92 > Also why only tabs to spaces but \n to a '?'\r
93 \r
94 The notmuch header parser converts the tabs in header folding to spaces,\r
95 gmime keeps them as tabs. AFAICT that is the only difference between\r
96 headers indexed by notmuch and gmime, and causes tests to fail. So we do\r
97 the tabs to spaces conversion here to produce same output from cli. This\r
98 patch just does the minimal change required for tests to pass; other\r
99 changes might be good too, but they were not relevant for this series.\r
100 \r
101 BR,\r
102 Jani.\r
103 \r
104 >\r
105 > Best wishes\r
106 >\r
107 > Mark\r
108 >\r
109 >\r
110 >\r
111 >\r
112 >>  notmuch-search.c | 4 +++-\r
113 >>  1 file changed, 3 insertions(+), 1 deletion(-)\r
114 >>\r
115 >> diff --git a/notmuch-search.c b/notmuch-search.c\r
116 >> index d9d39ec..eab314f 100644\r
117 >> --- a/notmuch-search.c\r
118 >> +++ b/notmuch-search.c\r
119 >> @@ -40,7 +40,9 @@ sanitize_string (const void *ctx, const char *str)\r
120 >>      loop = out = talloc_strdup (ctx, str);\r
121 >>  \r
122 >>      for (; *loop; loop++) {\r
123 >> -    if ((unsigned char)(*loop) < 32)\r
124 >> +    if (*loop == '\t')\r
125 >> +        *loop = ' ';\r
126 >> +    else if ((unsigned char)(*loop) < 32)\r
127 >>          *loop = '?';\r
128 >>      }\r
129 >>      return out;\r
130 >> -- \r
131 >> 1.8.4.rc3\r
132 >>\r
133 >> _______________________________________________\r
134 >> notmuch mailing list\r
135 >> notmuch@notmuchmail.org\r
136 >> http://notmuchmail.org/mailman/listinfo/notmuch\r