Re: [PATCH 9/9] add has: query prefix to search for specific properties
[notmuch-archives.git] / fa / 55ebde9ac6cf9fb573bffaf3121a59869753cf
1 Return-Path: <bremner@tethera.net>\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 6FA4B431FB6\r
6         for <notmuch@notmuchmail.org>; Tue, 25 Dec 2012 11:43:26 -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.001\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0.001 tagged_above=-999 required=5\r
12         tests=[WEIRD_QUOTING=0.001] 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 pe9l27d3vXi6 for <notmuch@notmuchmail.org>;\r
16         Tue, 25 Dec 2012 11:43:24 -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 43A78429E37\r
21         for <notmuch@notmuchmail.org>; Tue, 25 Dec 2012 11:43:16 -0800 (PST)\r
22 Received: from fctnnbsc30w-156034082078.dhcp-dynamic.fibreop.nb.bellaliant.net\r
23         ([156.34.82.78] 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@tethera.net>)\r
27         id 1TnaPC-0001iQ-5i; Tue, 25 Dec 2012 15:43:15 -0400\r
28 Received: from bremner by zancas.localnet with local (Exim 4.80)\r
29         (envelope-from <bremner@tethera.net>)\r
30         id 1TnaP3-0005nh-Lk; Tue, 25 Dec 2012 15:43:05 -0400\r
31 From: david@tethera.net\r
32 To: notmuch@notmuchmail.org\r
33 Subject: [PATCH 10/11] man: document notmuch tag --batch, --input options\r
34 Date: Tue, 25 Dec 2012 15:42:46 -0400\r
35 Message-Id: <1356464567-21779-11-git-send-email-david@tethera.net>\r
36 X-Mailer: git-send-email 1.7.10.4\r
37 In-Reply-To: <1356464567-21779-1-git-send-email-david@tethera.net>\r
38 References: <1356464567-21779-1-git-send-email-david@tethera.net>\r
39 X-Spam_bar: -\r
40 X-BeenThere: notmuch@notmuchmail.org\r
41 X-Mailman-Version: 2.1.13\r
42 Precedence: list\r
43 List-Id: "Use and development of the notmuch mail system."\r
44         <notmuch.notmuchmail.org>\r
45 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
46         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
47 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
48 List-Post: <mailto:notmuch@notmuchmail.org>\r
49 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
50 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
51         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
52 X-List-Received-Date: Tue, 25 Dec 2012 19:43:26 -0000\r
53 \r
54 From: Jani Nikula <jani@nikula.org>\r
55 \r
56 ---\r
57  man/man1/notmuch-tag.1 |   92 ++++++++++++++++++++++++++++++++++++++++++++++++\r
58  1 file changed, 92 insertions(+)\r
59 \r
60 diff --git a/man/man1/notmuch-tag.1 b/man/man1/notmuch-tag.1\r
61 index 9444aa4..3aa2fa5 100644\r
62 --- a/man/man1/notmuch-tag.1\r
63 +++ b/man/man1/notmuch-tag.1\r
64 @@ -6,6 +6,11 @@ notmuch-tag \- add/remove tags for all messages matching the search terms\r
65  .B notmuch tag\r
66  .RI "+<" tag ">|\-<" tag "> [...] [\-\-] <" search-term "> [...]"\r
67  \r
68 +.B notmuch tag\r
69 +.RI "--batch"\r
70 +.RI "[ --input=<" filename "> ]"\r
71 +\r
72 +\r
73  .SH DESCRIPTION\r
74  \r
75  Add/remove tags for all messages matching the search terms.\r
76 @@ -30,6 +35,93 @@ updates the maildir flags according to tag changes if the\r
77  configuration option is enabled. See \fBnotmuch-config\fR(1) for\r
78  details.\r
79  \r
80 +Supported options for\r
81 +.B tag\r
82 +include\r
83 +.RS 4\r
84 +.TP 4\r
85 +.BR \-\-batch\r
86 +\r
87 +Read batch tagging operations from a file (stdin by default). This is more\r
88 +efficient than repeated\r
89 +.B notmuch tag\r
90 +invocations. See\r
91 +.B TAG FILE FORMAT\r
92 +below for the input format. This option is not compatible with\r
93 +specifying tagging on the command line.\r
94 +.RE\r
95 +\r
96 +.RS 4\r
97 +.TP 4\r
98 +.BR "\-\-input=" <filename>\r
99 +\r
100 +Read input from given file, instead of from stdin. Implies\r
101 +.BR --batch .\r
102 +\r
103 +.SH TAG FILE FORMAT\r
104 +\r
105 +The input must consist of lines of the format:\r
106 +\r
107 +.RI "+<" tag ">|\-<" tag "> [...] [\-\-] <" query ">"\r
108 +\r
109 +Each line is interpreted similarly to\r
110 +.B notmuch tag\r
111 +command line arguments. The delimiter is one or more spaces ' '. Any\r
112 +characters in\r
113 +.RI < tag >\r
114 +.B may\r
115 +be hex-encoded with %NN where NN is the hexadecimal value of the\r
116 +character. To hex-encode a character with a multi-byte UTF-8 encoding,\r
117 +hex-encode each byte.\r
118 +Any spaces in <tag>\r
119 +.B must\r
120 +be hex-encoded as %20. Any characters that are not\r
121 +part of\r
122 +.RI  < tag >\r
123 +.B must not\r
124 +be hex-encoded.\r
125 +\r
126 +In the future tag:"tag with spaces" style quoting may be supported for\r
127 +.RI < tag >\r
128 +as well;\r
129 +for this reason all double quote characters in\r
130 +.RI < tag >\r
131 +.B should\r
132 +be hex-encoded.\r
133 +\r
134 +The\r
135 +.RI < query >\r
136 +should be quoted using Xapian boolean term quoting rules: if a term\r
137 +contains whitespace or a close paren or starts with a double quote, it\r
138 +must be enclosed in double quotes (not including any prefix) and\r
139 +double quotes inside the term must be doubled (see below for\r
140 +examples).\r
141 +\r
142 +Leading and trailing space ' ' is ignored. Empty lines and lines\r
143 +beginning with '#' are ignored.\r
144 +\r
145 +.SS EXAMPLE\r
146 +\r
147 +The following shows a valid input to batch tagging. Note that only the\r
148 +isolated '*' acts as a wildcard. Also note the two different quotings\r
149 +of the tag\r
150 +.B space in tags\r
151 +.\r
152 +.RS\r
153 +.nf\r
154 ++winner *\r
155 ++foo::bar%25 -- (One and Two) or (One and tag:winner)\r
156 ++found::it -- tag:foo::bar%\r
157 +# ignore this line and the next\r
158 +\r
159 ++space%20in%20tags -- Two\r
160 +# add tag '(tags)', among other stunts.\r
161 ++crazy{ +(tags) +&are +#possible\ -- tag:"space in tags"\r
162 ++match*crazy -- tag:crazy{\r
163 ++some_tag -- id:"this is ""nauty)"""\r
164 +.fi\r
165 +.RE\r
166 +\r
167  .SH SEE ALSO\r
168  \r
169  \fBnotmuch\fR(1), \fBnotmuch-config\fR(1), \fBnotmuch-count\fR(1),\r
170 -- \r
171 1.7.10.4\r
172 \r