Put structure into anno(1) and its man page.
[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 If the
182 .B \-number
183 option is also used,
184 the listing is numbered, starting at 1.
185 .PP
186 The
187 .B \-component
188 option specifies the field name of headers to list.
189 If no
190 .B \-component
191 .I field
192 is specified,
193 .B anno
194 will prompt the user for the name.
195
196 .SH FILES
197 .fc ^ ~
198 .nf
199 .ta \w'%etcdir%/ExtraBigFileName  'u
200 ^$HOME/.mmh/profile~^The user profile
201 .fi
202
203 .SH "PROFILE COMPONENTS"
204 .fc ^ ~
205 .nf
206 .ta 2.4i
207 .ta \w'ExtraBigProfileName  'u
208 ^Path:~^To determine the user's mail storage
209 ^Current\-Folder:~^To find the default current folder
210 .fi
211
212 .SH "SEE ALSO"
213 dist(1), forw(1), repl(1)
214
215 .SH DEFAULTS
216 .nf
217 .RI ` +folder "' defaults to the current folder"
218 .RI ` msgs "' defaults to cur"
219 .RB ` \-date '
220 .RB ` \-nopreserve '
221 .fi
222
223 .SH CONTEXT
224 If a folder is given, it will become the current folder.  The first
225 message annotated will become the current message.
226
227 .SH BUGS
228 .PP
229 The
230 .B \-number
231 switch must appear after either the
232 .B \-list
233 or the
234 .B \-delete
235 mode switch, on the command line.
236 Otherwise it is not possible to determine if it takes an argument.