Drop the SYNOPSIS section from some man pages
[mmh] / man / mh-sequence.man7
1 .\"
2 .\" %nmhwarning%
3 .\"
4 .TH MH-SEQUENCE %manext7% "%nmhdate%" MH.6.8 [%nmhversion%]
5 .SH NAME
6 mh-sequence \- sequence specification for nmh message system
7 .SH DESCRIPTION
8 A sequence (or sequence set) is a symbolic name representing a
9 message or collection of messages.
10 .B nmh
11 has several internally
12 defined sequences, as well as allowing users to define their own
13 sequences.
14
15 .SS "Message Specification and Pre\-Defined Message Sequences"
16 Most
17 .B nmh
18 commands accept a `msg' or `msgs' specification, where
19 `msg' indicates one message and `msgs' indicates one or more messages.
20 To designate a message, you may use either its number (e.g., 1, 10, 234)
21 or one of these `reserved' message names:
22 .PP
23 .RS 5
24 .nf
25 .ta +\w'\fIName\fP      'u
26 .I "Name        Description
27 f       the first message in the folder
28 p       the message numerically preceding `c'
29 c       the most recently accessed message
30 n       the message numerically following `c'
31 l       the last message in the folder
32 .fi
33 .RE
34 .PP
35 In commands that take a `msg' argument, the default is `c'.
36 .PP
37 For example: In a folder containing five messages numbered 5, 10, 94, 177
38 and 325, `f' is 5 and `l' is 325.  If `c'
39 is 94, then `p' is 10 and `n' is 177.
40 .PP
41 The word `msgs' indicates that one or more messages may be specified.
42 Such a specification consists of one message designation or of several
43 message designations separated by spaces.  A message designation consists
44 either of a message name as defined above, or a message range.
45 .PP
46 A message range is specified as `name1\-name2' or
47 `name:i', where `name', `name1' and `name2' are message names,
48 and `i' is an integer.
49 .PP
50 The specification `name1\-name2' designates all currently existing
51 messages from `name1' to `name2' inclusive.  The `reserved'
52 message name `a' (``all'') is a shorthand for the message range
53 `f\-l'.
54 .PP
55 .RS 5
56 .nf
57 .ta +\w'\fIName\fP      'u
58 .I "Name        Description
59 a       all messages in the folder (i.e. `f\-l')
60 .fi
61 .RE
62 .PP
63 The specification `name:i' designates up to `i' messages.
64 These messages start with `name' if `name' is a message number or one of
65 the reserved names `f' `c', or `n', The
66 messages end with `name' if `name' is `p' or `l'.
67 The interpretation of `i' may be overridden by preceding `i' with a
68 plus or minus sign; `+i' always means up to `i' messages starting with
69 `name', and `\-i' always means up to `i' messages ending with `name'.
70 .PP
71 In commands which accept a `msgs' argument, the default is either
72 `c' or `a', depending on which makes more sense
73 for each command (see the individual man pages for details).
74 .PP
75 Repeated
76 specifications of the same message have the same effect as a single
77 specification of the message.
78 .PP
79 There is also a special `reserved' message name `b' (``beyond'')
80 which can be used with the
81 .B mhpath
82 command. It refers to the next (not yet used) message number 
83 after `l'.
84 .PP
85 .RS 5
86 .nf
87 .ta +\w'\fIName\fP      'u
88 .I "Name        Description
89 b       the next message number beyond `l'
90 .fi
91 .RE
92
93 .SS "User\-Defined Message Sequences"
94 In addition to the `reserved' (pre-defined) message names given
95 above,
96 .B nmh
97 supports user-defined sequence names.  User-defined
98 sequences allow the
99 .B nmh
100 user a tremendous amount of power in dealing
101 with groups of messages in the same folder by allowing the user to bind
102 a group of messages to a meaningful symbolic name.
103 .PP
104 The name used to denote a message sequence must consist of an alphabetic
105 character followed by zero or more alphanumeric characters, and can not
106 be one of the `reserved' message names above.  After defining a
107 sequence, it can be used wherever an
108 .B nmh
109 command expects a `msg' or
110 `msgs' argument.
111 .PP
112 Some forms of message ranges are allowed with user-defined sequences.
113 The specification `name:i' may be used, and it designates up
114 to the first `i' messages (or last `i' messages for `\-i') which are
115 elements of the user-defined sequence `name'.
116 .PP
117 The specifications `name:n' and `name:p' may also
118 be used, and they designate the next or previous message (relative to the
119 current message) which is an element of the user-defined sequence `name'.
120 The specifications `name:f' and `name:l' are
121 equivalent to `name:1' and `name:\-1', respectively.  The
122 specification `name:c' is not allowed (use just `c' instead).
123 Note: The syntax of these message range specifications is subject
124 to change in the future.
125 .PP
126 User-defined sequence names are specific to each folder.  They are
127 defined using the
128 .B pick
129 and
130 .B mark
131 commands.
132
133 .SS "Public and Private User-Defined Sequences"
134 There are two varieties of user-defined sequences:
135 public and private.  Public sequences of a folder are accessible to any
136 .B nmh
137 user that can read that folder.  They are kept in each folder
138 in the file determined by the `Mh\-Sequences' profile entry
139 (default is
140 .IR \&.mh_sequences ).
141 Private sequences are accessible
142 only to the
143 .B nmh
144 user that defined those sequences and are kept in
145 the user's
146 .B nmh
147 context file.
148 .PP
149 In general, the commands that create sequences (such as
150 .B pick
151 and
152 .BR mark )
153 will create public sequences if the folder for which
154 the sequences are being defined is writable by the
155 .B nmh
156 user.
157 For most commands, this can be overridden by using the switches
158 .B \-public
159 and
160 .BR \-private .
161 But if the folder is read\-only, or if
162 the `Mh\-Sequences' profile entry is defined but empty, then
163 \fIprivate\fR sequences will be created instead.
164
165 .SS "Sequence Negation"
166 .B Nmh
167 provides the ability to select all messages
168 .B not
169 elements of a user-defined sequence.
170 A special string is used to preface an existing user-defined
171 sequence name.  This specification then refers to those
172 messages not elements of the specified sequence name.
173 The default negation prefix is the exlamation mark `!',
174 but it may be change to any string, by defining the entry
175 `Sequence\-Negation' in the
176 .B nmh
177 profile file.
178 For example, if the profile entry is:
179 .PP
180 .RS 5
181 Sequence\-Negation: not
182 .RE
183 .PP
184 then anytime an
185 .B nmh
186 command is given `notfoo' as a `msg' or
187 `msgs' argument, it would substitute all messages that are not elements
188 of the sequence `foo'.
189 .PP
190 Obviously, the user should beware of defining sequences with names that
191 begin with the value of the `Sequence\-Negation' profile entry.
192 The default value `!' was chosen due to its similar meaning in the C
193 programming language, and because it cannot be part of a user-defined
194 sequence. But if your shell provides history expansion,
195 you might need to quote the exlamation mark (prefix it with a backslash).
196 .PP
197 To deactivate the negation mechanism, define Sequence\-Negation in your
198 profile to an empty value.
199
200 .SS "The Previous Sequence"
201 .B Nmh
202 provides the ability to remember the `msgs' or `msg' argument
203 last given to an
204 .B nmh
205 command.  The entry `Previous\-Sequence'
206 should be defined in the
207 .B nmh
208 profile; its value should be a sequence
209 name or multiple sequence names separated by spaces.  If this entry
210 is defined, when an
211 .B nmh
212 command finishes, it will define the
213 sequence(s) named in the value of this entry to be those messages that
214 were specified to the command.  Hence, a profile entry of
215 .PP
216 .RS 5
217 Previous\-Sequence: pseq
218 .RE
219 .PP
220 directs any
221 .B nmh
222 command that accepts a `msg' or `msgs' argument to
223 define the sequence `pseq' as those messages when it finishes.
224 .PP
225 .BR Note :
226 there can be a performance penalty in using the
227 `Previous\-Sequence' facility.  If it is used,
228 .B all
229 .B nmh
230 programs have to write the sequence information to the
231 .I \&.mh_sequences
232 file for the folder each time they run.  If the
233 `Previous\-Sequence' profile entry is not included, only
234 .B pick
235 and
236 .B mark
237 will write to the
238 .B \&.mh_sequences
239 file.
240
241 .SS "The Unseen Sequence"
242 Finally, the unseen sequence indicates which messages have not been
243 previously seen by the user.
244 The commands
245 .BR inc ,
246 .BR rcvstore ,
247 .BR show ,
248 and
249 .B flist
250 honor the sequence.
251 Whenever new messages are placed in a folder (using
252 .B inc
253 or
254 .BR rcvstore ),
255 the new messages will also be added to the unseen sequence.
256 .RE
257 .PP
258 .BR inc ,
259 for example,
260 adds new messages to the unseen sequence.
261 Unlike the behavior of the previous sequence, however,
262 the unseen sequence will
263 .B not
264 be zeroed by
265 .BR inc .
266 .PP
267 Similarly, whenever
268 .BR show ,
269 .BR next ,
270 or
271 .B prev
272 display a message, that message will be removed from
273 the unseen sequence.
274 .PP
275 The default unseen sequence is named `u'.
276 To change, define a `Unseen\-Sequence' entry in your profile.
277 It may also contain multiple sequence names, separated by spaces.
278 In this case, anything that applied to a single unseen sequence,
279 applies to multiple ones, too.
280 .PP
281 The unseen sequence mechanism is automatically activated.
282 To deactivate it, define the `Unseen\-Sequence' entry
283 in your profile with an empty value.
284
285
286 .SH FILES
287 .fc ^ ~
288 .nf
289 .ta \w'%etcdir%/ExtraBigFileName  'u
290 ^$HOME/.mmh/profile~^The user profile
291 ^$HOME/.mmh/context~^The user context
292 ^<folder>/\&.mh_sequences~^File for public sequences
293 .fi
294
295 .SH "PROFILE COMPONENTS"
296 .fc ^ ~
297 .nf
298 .ta 2.4i
299 .ta \w'ExtraBigProfileName  'u
300 ^Mh-Sequences:~^Name of file to store public sequences
301 ^Sequence\-Negation:~^To designate messages not in a sequence
302 ^Previous\-Sequence:~^The last message specification given
303 ^Unseen\-Sequence:~^Those messages not yet seen by the user
304 .fi
305
306 .SH "SEE ALSO"
307 flist(1), mark(1), pick(1), mh-profile(5)
308
309 .SH DEFAULTS
310 None