Fix missing va_end call in uip/mhmisc.c
[mmh] / man / anno.man1
1 .\"
2 .\" %nmhwarning%
3 .\"
4 .TH ANNO %manext1% "%nmhdate%" MH.6.8 [%nmhversion%]
5 .SH NAME
6 anno \- annotate messages
7 .SH SYNOPSIS
8 .HP 5
9 .na
10 .B anno
11 .RI [ +folder ]
12 .RI [ msgs ]
13 .RB [ \-component
14 .IR field ]
15 .RB [ \-text
16 .IR body ]
17 .RB [ \-append ]
18 .RB [ \-date " | " \-nodate ]
19 .RB [ \-preserve " | " \-nopreserve ]
20 .RB [ \-Version ]
21 .RB [ \-help ]
22 .HP
23 .B anno
24 .B \-delete
25 .RI [ +folder ]
26 .RI [ msgs ]
27 .RB [ \-component
28 .IR field ]
29 .RB [ \-text
30 .IR body ]
31 .RB [ \-number
32 .IR num " | all ]
33 .RB [ \-preserve " | " \-nopreserve ]
34 .RB [ \-Version ]
35 .RB [ \-help ]
36 .HP
37 .B anno
38 .B \-list
39 .RI [ +folder ]
40 .RI [ msgs ]
41 .RB [ \-component
42 .IR field ]
43 .RB [ \-number ]
44 .RB [ \-Version ]
45 .RB [ \-help ]
46 .ad
47 .SH DESCRIPTION
48 .B Anno
49 manipulates header fields or
50 .I annotations
51 in messages.
52 Header fields consist of a field name and an optional field body
53 as defined by RFC-2822.
54 The field name may consist of alphanumerics and dashes only.
55 The field body may consist of arbitrary text.
56 .PP
57 Usually, annotation is performed by the commands
58 .BR dist ,
59 .BR forw ,
60 and
61 .BR repl ,
62 if they are given the
63 .B \-anno
64 switch.  This allows you to keep track of your redistribution of,
65 forwarding of, and replies to a message.
66 The
67 .B whatnow
68 shell uses annoations to manage attachments, too.
69 .PP
70 By using
71 .BR anno
72 manually, you can perform arbitrary annotations of your own.
73 .PP
74 .B Anno
75 has three operation modes: Adding, deleting and listing of header lines.
76
77 .SS "Add mode
78 .PP
79 This is the default mode.
80 Historically, it had been the only mode available.
81 .PP
82 Each message selected will be annotated with the lines
83 .PP
84 .RS 5
85 .nf
86 field:\ date
87 field:\ body
88 .fi
89 .RE
90 .PP
91 The
92 .B \-component
93 option specifies the field name.
94 If no
95 .B \-component
96 .I field
97 is specified,
98 .B anno
99 will prompt the user for the name of field for the annotation.
100 .PP
101 The
102 .B \-text
103 option specifies the field body.
104 If it is missing, only the date annotation will be added.
105 The
106 .B \-nodate
107 switch inhibits the date annotation, leaving only the
108 body annotation.
109 .PP
110 By default,
111 .B anno
112 prepends the annotations to the message.
113 Annotations are instead appended if the
114 .B \-append
115 option is specified.
116 .PP
117 .B Anno
118 always does the annotation inplace in order to preserve
119 any links to the message.
120 .PP
121 By default,
122 .B anno
123 changes the last-accessed and last-modified times on annotate messages
124 to the time at which the annotation occurs.
125 .B Anno
126 preserves the original times if the
127 .B \-preserve
128 option is used.
129
130 .SS "Delete mode
131 .PP
132 The
133 .B \-delete
134 mode removes header fields from messages.
135 By default, the first header field whose name matches the component
136 is deleted.
137 .PP
138 The
139 .B \-component
140 option specifies the field name of headers to delete.
141 If no
142 .B \-component
143 .I field
144 is specified,
145 .B anno
146 will prompt the user for the name.
147 .PP
148 If the
149 .B \-text
150 option is used,
151 the first header field whose name matches the component and
152 whose body matches the text is deleted.
153 The text is treated as if it was a path name; if it begins with a
154 slash, the entire field body must match the text, otherwise just the
155 last path name component of the field body must match.
156 .PP
157 If the
158 .B \-number
159 option is used,
160 the
161 .IR n th
162 header field whose name matches the component is deleted.
163 The numbers are the same as those produced in
164 .B \-list
165 mode.
166 The special value `all' can be used for the number,
167 and causes all components that match the name to be deleted.
168 .PP
169 Either
170 .B \-text
171 or
172 .B \-number
173 may be specified, but not both at the same time.
174
175 .SS "List mode
176 .PP
177 The
178 .B \-list
179 mode produces a listing of the field bodies for header fields with
180 matching component names, one per line.
181 Trailing whitespace in the field body does not get printed.
182 If the
183 .B \-number
184 option is also used,
185 the listing is numbered, starting at 1.
186 .PP
187 The
188 .B \-component
189 option specifies the field name of headers to list.
190 If no
191 .B \-component
192 .I field
193 is specified,
194 .B anno
195 will prompt the user for the name.
196
197 .SH FILES
198 .fc ^ ~
199 .nf
200 .ta \w'%etcdir%/ExtraBigFileName  'u
201 ^$HOME/.mmh/profile~^The user profile
202 .fi
203
204 .SH "PROFILE COMPONENTS"
205 .fc ^ ~
206 .nf
207 .ta 2.4i
208 .ta \w'ExtraBigProfileName  'u
209 ^Path:~^To determine the user's mail storage
210 ^Current\-Folder:~^To find the default current folder
211 .fi
212
213 .SH "SEE ALSO"
214 dist(1), forw(1), repl(1)
215
216 .SH DEFAULTS
217 .nf
218 .RI ` +folder "' defaults to the current folder"
219 .RI ` msgs "' defaults to the current message"
220 .RB ` \-date '
221 .RB ` \-nopreserve '
222 .fi
223
224 .SH CONTEXT
225 If a folder is given, it will become the current folder.  The first
226 message annotated will become the current message.
227
228 .SH BUGS
229 .PP
230 The
231 .B \-number
232 switch must appear after either the
233 .B \-list
234 or the
235 .B \-delete
236 mode switch, on the command line.
237 Otherwise it is not possible to determine if it takes an argument.