1 .TH NOTMUCH-TAG 1 2013-01-18 "Notmuch 0.15"
3 notmuch-tag \- add/remove tags for all messages matching the search terms
7 .RI "+<" tag ">|\-<" tag "> [...] [\-\-] <" search-term "> [...]"
11 .RI "[ --input=<" filename "> ]"
16 Add/remove tags for all messages matching the search terms.
18 See \fBnotmuch-search-terms\fR(7)
19 for details of the supported syntax for
22 Tags prefixed by '+' are added while those prefixed by '\-' are
23 removed. For each message, tag changes are applied in the order they
24 appear on the command line.
26 The beginning of the search terms is recognized by the first
27 argument that begins with neither '+' nor '\-'. Support for
28 an initial search term beginning with '+' or '\-' is provided
29 by allowing the user to specify a "\-\-" argument to separate
30 the tags from the search terms.
33 updates the maildir flags according to tag changes if the
34 .B "maildir.synchronize_flags"
35 configuration option is enabled. See \fBnotmuch-config\fR(1) for
45 Read batch tagging operations from a file (stdin by default). This is more
46 efficient than repeated
50 below for the input format. This option is not compatible with
51 specifying tagging on the command line.
56 .BR "\-\-input=" <filename>
58 Read input from given file, instead of from stdin. Implies
63 The input must consist of lines of the format:
65 .RI "+<" tag ">|\-<" tag "> [...] [\-\-] <" query ">"
67 Each line is interpreted similarly to
69 command line arguments. The delimiter is one or more spaces ' '. Any
73 be hex-encoded with %NN where NN is the hexadecimal value of the
74 character. To hex-encode a character with a multi-byte UTF-8 encoding,
78 be hex-encoded as %20. Any characters that are not
84 In the future tag:"tag with spaces" style quoting may be supported for
87 for this reason all double quote characters in
94 should be quoted using Xapian boolean term quoting rules: if a term
95 contains whitespace or a close paren or starts with a double quote, it
96 must be enclosed in double quotes (not including any prefix) and
97 double quotes inside the term must be doubled (see below for
100 Leading and trailing space ' ' is ignored. Empty lines and lines
101 beginning with '#' are ignored.
105 The following shows a valid input to batch tagging. Note that only the
106 isolated '*' acts as a wildcard. Also note the two different quotings
113 +foo::bar%25 -- (One and Two) or (One and tag:winner)
114 +found::it -- tag:foo::bar%
115 # ignore this line and the next
117 +space%20in%20tags -- Two
118 # add tag '(tags)', among other stunts.
119 +crazy{ +(tags) +&are +#possible\ -- tag:"space in tags"
120 +match*crazy -- tag:crazy{
121 +some_tag -- id:"this is ""nauty)"""
127 \fBnotmuch\fR(1), \fBnotmuch-config\fR(1), \fBnotmuch-count\fR(1),
128 \fBnotmuch-dump\fR(1), \fBnotmuch-hooks\fR(5), \fBnotmuch-new\fR(1),
129 \fBnotmuch-reply\fR(1), \fBnotmuch-restore\fR(1),
130 \fBnotmuch-search\fR(1), \fBnotmuch-search-terms\fR(7),
131 \fBnotmuch-show\fR(1),