Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 66 / 97295255f6f78d59d017d95d7389fc8445eab9
1 Return-Path: <bremner@unb.ca>\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 5217F431FB6\r
6         for <notmuch@notmuchmail.org>; Sun,  9 Dec 2012 17:00:07 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         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 MlbnjdaPVx1L for <notmuch@notmuchmail.org>;\r
16         Sun,  9 Dec 2012 17:00:05 -0800 (PST)\r
17 Received: from tesseract.cs.unb.ca (tesseract.cs.unb.ca [131.202.240.238])\r
18         (using TLSv1 with cipher AES256-SHA (256/256 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id 38A60431FAF\r
21         for <notmuch@notmuchmail.org>; Sun,  9 Dec 2012 17:00:05 -0800 (PST)\r
22 Received: from fctnnbsc30w-142167090129.dhcp-dynamic.fibreop.nb.bellaliant.net\r
23         ([142.167.90.129] helo=zancas.localnet)\r
24         by tesseract.cs.unb.ca with esmtpsa\r
25         (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72)\r
26         (envelope-from <bremner@unb.ca>)\r
27         id 1Thrj0-0007aU-2R; Sun, 09 Dec 2012 21:00:04 -0400\r
28 Received: from bremner by zancas.localnet with local (Exim 4.80)\r
29         (envelope-from <bremner@unb.ca>)\r
30         id 1Thriu-0003Dr-G2; Sun, 09 Dec 2012 20:59:56 -0400\r
31 From: David Bremner <david@tethera.net>\r
32 To: notmuch@notmuchmail.org\r
33 Subject: Re: V6 batch tagging patches.\r
34 In-Reply-To: <1355096008-4544-1-git-send-email-david@tethera.net>\r
35 References: <1355096008-4544-1-git-send-email-david@tethera.net>\r
36 User-Agent: Notmuch/0.14+151~g9a98977 (http://notmuchmail.org) Emacs/24.1.1\r
37         (x86_64-pc-linux-gnu)\r
38 Date: Sun, 09 Dec 2012 20:59:56 -0400\r
39 Message-ID: <87obi2pvqr.fsf@zancas.localnet>\r
40 MIME-Version: 1.0\r
41 Content-Type: text/plain\r
42 X-Spam_bar: -\r
43 X-BeenThere: notmuch@notmuchmail.org\r
44 X-Mailman-Version: 2.1.13\r
45 Precedence: list\r
46 List-Id: "Use and development of the notmuch mail system."\r
47         <notmuch.notmuchmail.org>\r
48 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
49         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
50 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
51 List-Post: <mailto:notmuch@notmuchmail.org>\r
52 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
53 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
54         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
55 X-List-Received-Date: Mon, 10 Dec 2012 01:00:07 -0000\r
56 \r
57 david@tethera.net writes:\r
58 \r
59 > This obsoletes the remaining patches in \r
60 >\r
61 >      id:1353792017-31459-1-git-send-email-david@tethera.net\r
62 >\r
63 > This isn't really v6 of these particular patches, but oh well.\r
64 \r
65 I forgot to mention that I will probably add some more tests; several of\r
66 the dump/restore batch-tag format tests can be re-used.\r
67 \r
68 Here is a log of changes for the last set of reviews.\r
69 \r
70 commit 120b1aef754cbe969e0421d5557f0308381f73d2\r
71 Author: David Bremner <bremner@debian.org>\r
72 Date:   Sun Dec 9 15:57:10 2012 -0400\r
73 \r
74     fixup for id:87txs5qqeb.fsf@nikula.org\r
75 \r
76 diff --git a/notmuch-tag.c b/notmuch-tag.c\r
77 index dbd98a0..b8732f6 100644\r
78 --- a/notmuch-tag.c\r
79 +++ b/notmuch-tag.c\r
80 @@ -169,7 +169,7 @@ tag_file (void *ctx, notmuch_database_t *notmuch, tag_op_flag_t flags,\r
81      while ((line_len = getline (&line, &line_size, input)) != -1 &&\r
82            ! interrupted) {\r
83  \r
84 -       ret =  parse_tag_line (ctx, line, TAG_FLAG_NONE,\r
85 +       ret = parse_tag_line (ctx, line, TAG_FLAG_NONE,\r
86                                &query_string, tag_ops);\r
87  \r
88         if (ret > 0)\r
89 @@ -194,7 +194,7 @@ notmuch_tag_command (void *ctx, int argc, char *argv[])\r
90      notmuch_config_t *config;\r
91      notmuch_database_t *notmuch;\r
92      struct sigaction action;\r
93 -    tag_op_flag_t synchronize_flags = TAG_FLAG_NONE;\r
94 +    tag_op_flag_t tag_flags = TAG_FLAG_NONE;\r
95      notmuch_bool_t batch = FALSE;\r
96      FILE *input = stdin;\r
97      char *input_file_name = NULL;\r
98 @@ -255,12 +255,12 @@ notmuch_tag_command (void *ctx, int argc, char *argv[])\r
99         return 1;\r
100  \r
101      if (notmuch_config_get_maildir_synchronize_flags (config))\r
102 -       synchronize_flags = TAG_FLAG_MAILDIR_SYNC;\r
103 +       tag_flags |= TAG_FLAG_MAILDIR_SYNC;\r
104  \r
105      if (batch)\r
106 -       ret = tag_file (ctx, notmuch, synchronize_flags, input);\r
107 +       ret = tag_file (ctx, notmuch, tag_flags, input);\r
108      else\r
109 -       ret = tag_query (ctx, notmuch, query_string, tag_ops, synchronize_flags);\r
110 +       ret = tag_query (ctx, notmuch, query_string, tag_ops, tag_flags);\r
111  \r
112      notmuch_database_destroy (notmuch);\r
113  \r
114 \r
115 commit bf8d4de2b174cff389d5f5fe4bdd10df2323fe77\r
116 Author: David Bremner <bremner@debian.org>\r
117 Date:   Sun Dec 9 16:19:32 2012 -0400\r
118 \r
119     changes for id:87pq2tqpvq.fsf@nikula.org\r
120 \r
121 diff --git a/test/tagging b/test/tagging\r
122 index 7155e47..0f3d797 100755\r
123 --- a/test/tagging\r
124 +++ b/test/tagging\r
125 @@ -59,8 +59,9 @@ test_expect_equal "$output" "\\r
126  thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; One (inbox tag5 unread)\r
127  thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; Two (inbox tag4 tag5 unread)"\r
128  \r
129 +# generate a common input file for the next several tests.\r
130  cat > batch.in  <<EOF\r
131 -# %20 is a space in tag\r
132 +# %40 is an @ in tag\r
133  +%40 -tag5 +tag6 -- One\r
134  +tag1 -tag1 -tag4 +tag4 -- Two\r
135  -tag5 +tag6 Two\r
136 @@ -72,18 +73,18 @@ thread:XXX   2001-01-05 [1/1] Notmuch Test Suite; Two (inbox tag4 tag6 unread)\r
137  EOF\r
138  \r
139  test_begin_subtest "--input"\r
140 -notmuch dump > backup.tags\r
141 +notmuch dump --format=batch-tag > backup.tags\r
142  notmuch tag --input=batch.in\r
143 -notmuch search \* | notmuch_search_sanitize > OUTPUT\r
144 -notmuch restore < backup.tags\r
145 -test_expect_equal_file OUTPUT batch.expected\r
146 +notmuch search \* | notmuch_search_sanitize > OUTPUT.$test_count\r
147 +notmuch restore --format=batch-tag < backup.tags\r
148 +test_expect_equal_file batch.expected OUTPUT.$test_count\r
149  \r
150  test_begin_subtest "--batch --input"\r
151 -notmuch dump > backup.tags\r
152 +notmuch dump --format=batch-tag > backup.tags\r
153  notmuch tag --batch --input=batch.in\r
154 -notmuch search \* | notmuch_search_sanitize > OUTPUT\r
155 -notmuch restore < backup.tags\r
156 -test_expect_equal_file OUTPUT batch.expected\r
157 +notmuch search \* | notmuch_search_sanitize > OUTPUT.$test_count\r
158 +notmuch restore --format=batch-tag < backup.tags\r
159 +test_expect_equal_file batch.expected OUTPUT.$test_count\r
160  \r
161  test_begin_subtest "--batch, blank lines and comments"\r
162  notmuch dump | sort > EXPECTED.$test_count\r
163 \r
164 commit 4fa12e718b0eaf82f26b9b8aea48f860fc5e1f72\r
165 Author: David Bremner <bremner@debian.org>\r
166 Date:   Sun Dec 9 16:24:13 2012 -0400\r
167 \r
168     changes for id:87sj7xi9j5.fsf@qmul.ac.uk and id:871uf8egi8.fsf@nikula.org\r
169 \r
170 diff --git a/man/man1/notmuch-tag.1 b/man/man1/notmuch-tag.1\r
171 index 751db7b..3c15393 100644\r
172 --- a/man/man1/notmuch-tag.1\r
173 +++ b/man/man1/notmuch-tag.1\r
174 @@ -61,12 +61,12 @@ Read input from given file, instead of from stdin. Implies\r
175  \r
176  The input must consist of lines of the format:\r
177  \r
178 -.RI "T +<" tag ">|\-<" tag "> [...] [\-\-] <" search-terms ">"\r
179 +.RI "+<" tag ">|\-<" tag "> [...] [\-\-] <" search-term "> [...]"\r
180  \r
181  Each line is interpreted similarly to\r
182  .B notmuch tag\r
183  command line arguments. The delimiter is one or more spaces ' '. Any\r
184 -characters in <tag> and <search-terms>\r
185 +characters in <tag> and <search-term>\r
186  .B may\r
187  be hex encoded with %NN where NN is the hexadecimal value of the\r
188  character. Any ' ' and '%' characters in <tag> and <search-terms>\r