Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 71 / 9a71330e110513b1f1054c9e2492fe14c095d0
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 31D93429E2E\r
6         for <notmuch@notmuchmail.org>; Mon,  3 Feb 2014 11:52:05 -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
9 X-Spam-Flag: NO\r
10 X-Spam-Score: -0.7\r
11 X-Spam-Level: \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 0bDdN6qkOelq for <notmuch@notmuchmail.org>;\r
17         Mon,  3 Feb 2014 11:51:59 -0800 (PST)\r
18 Received: from mail-ee0-f46.google.com (mail-ee0-f46.google.com\r
19  [74.125.83.46])        (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
20  certificate requested) by olra.theworths.org (Postfix) with ESMTPS id\r
21  946CB431FBC    for <notmuch@notmuchmail.org>; Mon,  3 Feb 2014 11:51:59 -0800\r
22  (PST)\r
23 Received: by mail-ee0-f46.google.com with SMTP id c13so3820980eek.19\r
24         for <notmuch@notmuchmail.org>; Mon, 03 Feb 2014 11:51:55 -0800 (PST)\r
25 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
26         d=1e100.net; s=20130820;\r
27         h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\r
28         :references:in-reply-to:references;\r
29         bh=YiOooJ8S+StSl6Ci8Gb4VwSwSckzNuXaBtDhOz83PCo=;\r
30         b=B9eEnmkqmByE7lpx9BZM9cuxCN2/XQpSY7ovVdn3Ezs9JFxyv+SrB2SHbALxLsxT7x\r
31         gyqRoHkKTOTGK1xZtLWRJ6/FINHGq2aHcyxf93WILe2vANCPRCcncuesxJoouwJckkcE\r
32         ypxzdQ3le2DiGOL0MKUbvb9PV7Y6urJyLJzxuPbwE5pFyEsAvOiBGciXRbQzg2nvvNGL\r
33         b85yblA5hjmd6DLZ80WPsrGcW7epGzxD/kOOsDrf4iikPZ6OGThmbVVXdt7PXCH7/tYn\r
34         MJDKEZHYd9xL6gwwZGWdxCytEwVH9X2gryNC+adMtqvUSsGF0kbaLOFPB683nhS1q0Nw\r
35         FMMg==\r
36 X-Gm-Message-State:\r
37  ALoCoQlnUZhSEm5W+hKmdpwiZp3ZRBk/bN4XBnGktvMk15bwDuhXK0U0zw8+y5F9zZDU6ELQtqGH\r
38 X-Received: by 10.14.106.193 with SMTP id m41mr5147647eeg.62.1391457115851;\r
39         Mon, 03 Feb 2014 11:51:55 -0800 (PST)\r
40 Received: from localhost (dsl-hkibrasgw2-58c36f-91.dhcp.inet.fi.\r
41         [88.195.111.91]) by mx.google.com with ESMTPSA id\r
42         j42sm79872675eep.21.2014.02.03.11.51.53 for <multiple recipients>\r
43         (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
44         Mon, 03 Feb 2014 11:51:55 -0800 (PST)\r
45 From: Jani Nikula <jani@nikula.org>\r
46 To: notmuch@notmuchmail.org\r
47 Subject: [PATCH v3 1/6] cli: sanitize tabs and newlines to spaces in notmuch\r
48         search\r
49 Date: Mon,  3 Feb 2014 21:51:41 +0200\r
50 Message-Id:\r
51  <69cbcc33a4f0701ce39950510ff59c921eee6bc0.1391456555.git.jani@nikula.org>\r
52 X-Mailer: git-send-email 1.8.5.2\r
53 In-Reply-To: <cover.1391456555.git.jani@nikula.org>\r
54 References: <cover.1391456555.git.jani@nikula.org>\r
55 In-Reply-To: <cover.1391456555.git.jani@nikula.org>\r
56 References: <cover.1391456555.git.jani@nikula.org>\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: Mon, 03 Feb 2014 19:52:05 -0000\r
70 \r
71 Sanitize tabs and newlines to spaces rather than question marks in\r
72 --output=summary --format=text output.\r
73 \r
74 This will also hide any difference in unfolding a header that has been\r
75 folded with a tab. Our own header parser replaces tabs with spaces,\r
76 while gmime would retain the tab.\r
77 ---\r
78  notmuch-search.c           | 4 +++-\r
79  test/T090-search-output.sh | 2 +-\r
80  2 files changed, 4 insertions(+), 2 deletions(-)\r
81 \r
82 diff --git a/notmuch-search.c b/notmuch-search.c\r
83 index 91b5d10..0262eb3 100644\r
84 --- a/notmuch-search.c\r
85 +++ b/notmuch-search.c\r
86 @@ -41,7 +41,9 @@ sanitize_string (const void *ctx, const char *str)\r
87      loop = out = talloc_strdup (ctx, str);\r
88  \r
89      for (; *loop; loop++) {\r
90 -       if ((unsigned char)(*loop) < 32)\r
91 +       if (*loop == '\t' || *loop == '\n')\r
92 +           *loop = ' ';\r
93 +       else if ((unsigned char)(*loop) < 32)\r
94             *loop = '?';\r
95      }\r
96      return out;\r
97 diff --git a/test/T090-search-output.sh b/test/T090-search-output.sh\r
98 index 5ccfeaf..86544ac 100755\r
99 --- a/test/T090-search-output.sh\r
100 +++ b/test/T090-search-output.sh\r
101 @@ -388,7 +388,7 @@ add_message "[subject]='two =?ISO-8859-1?Q?line=0A_subject?=\r
102         headers'"\r
103  notmuch search id:"$gen_msg_id" | notmuch_search_sanitize >OUTPUT\r
104  cat <<EOF >EXPECTED\r
105 -thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; two line? subject headers (inbox unread)\r
106 +thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; two line  subject headers (inbox unread)\r
107  EOF\r
108  test_expect_equal_file OUTPUT EXPECTED\r
109  \r
110 -- \r
111 1.8.5.2\r
112 \r