4 .TH MH-SEQUENCE %manext7% "%nmhdate%" MH.6.8 [%nmhversion%]
6 mh-sequence \- sequence specification for nmh message system
12 A sequence (or sequence set) is a symbolic name representing a
13 message or collection of messages.
15 has several internally
16 defined sequences, as well as allowing users to define their own
19 .SS "Message Specification and Pre\-Defined Message Sequences"
22 commands accept a `msg' or `msgs' specification, where
23 `msg' indicates one message and `msgs' indicates one or more messages.
24 To designate a message, you may use either its number (e.g., 1, 10, 234)
25 or one of these `reserved' message names:
31 f the first message in the folder
32 p the message numerically preceding `c'
33 c the most recently accessed message
34 n the message numerically following `c'
35 l the last message in the folder
39 In commands that take a `msg' argument, the default is `c'.
41 For example: In a folder containing five messages numbered 5, 10, 94, 177
42 and 325, `f' is 5 and `l' is 325. If `c'
43 is 94, then `p' is 10 and `n' is 177.
45 The word `msgs' indicates that one or more messages may be specified.
46 Such a specification consists of one message designation or of several
47 message designations separated by spaces. A message designation consists
48 either of a message name as defined above, or a message range.
50 A message range is specified as `name1\-name2' or
51 `name:i', where `name', `name1' and `name2' are message names,
52 and `i' is an integer.
54 The specification `name1\-name2' designates all currently existing
55 messages from `name1' to `name2' inclusive. The `reserved'
56 message name `a' (``all'') is a shorthand for the message range
63 a all messages in the folder (i.e. `f\-l')
67 The specification `name:i' designates up to `i' messages.
68 These messages start with `name' if `name' is a message number or one of
69 the reserved names `f' `c', or `n', The
70 messages end with `name' if `name' is `p' or `l'.
71 The interpretation of `i' may be overridden by preceding `i' with a
72 plus or minus sign; `+i' always means up to `i' messages starting with
73 `name', and `\-i' always means up to `i' messages ending with `name'.
75 In commands which accept a `msgs' argument, the default is either
76 `c' or `a', depending on which makes more sense
77 for each command (see the individual man pages for details).
80 specifications of the same message have the same effect as a single
81 specification of the message.
83 There is also a special `reserved' message name `b' (``beyond'')
84 which can be used with the
86 command. It refers to the next (not yet used) message number
93 b the next message number beyond `l'
97 .SS "User\-Defined Message Sequences"
98 In addition to the `reserved' (pre-defined) message names given
101 supports user-defined sequence names. User-defined
104 user a tremendous amount of power in dealing
105 with groups of messages in the same folder by allowing the user to bind
106 a group of messages to a meaningful symbolic name.
108 The name used to denote a message sequence must consist of an alphabetic
109 character followed by zero or more alphanumeric characters, and can not
110 be one of the `reserved' message names above. After defining a
111 sequence, it can be used wherever an
113 command expects a `msg' or
116 Some forms of message ranges are allowed with user-defined sequences.
117 The specification `name:i' may be used, and it designates up
118 to the first `i' messages (or last `i' messages for `\-i') which are
119 elements of the user-defined sequence `name'.
121 The specifications `name:n' and `name:p' may also
122 be used, and they designate the next or previous message (relative to the
123 current message) which is an element of the user-defined sequence `name'.
124 The specifications `name:f' and `name:l' are
125 equivalent to `name:1' and `name:\-1', respectively. The
126 specification `name:c' is not allowed (use just `c' instead).
127 Note: The syntax of these message range specifications is subject
128 to change in the future.
130 User-defined sequence names are specific to each folder. They are
137 .SS "Public and Private User-Defined Sequences"
138 There are two varieties of user-defined sequences:
139 public and private. Public sequences of a folder are accessible to any
141 user that can read that folder. They are kept in each folder
142 in the file determined by the `Mh\-Sequences' profile entry
144 .IR \&.mh_sequences ).
145 Private sequences are accessible
148 user that defined those sequences and are kept in
153 In general, the commands that create sequences (such as
157 will create public sequences if the folder for which
158 the sequences are being defined is writable by the
161 For most commands, this can be overridden by using the switches
165 But if the folder is read\-only, or if
166 the `Mh\-Sequences' profile entry is defined but empty, then
167 \fIprivate\fR sequences will be created instead.
169 .SS "Sequence Negation"
171 provides the ability to select all messages
173 elements of a user-defined sequence.
174 A special string is used to preface an existing user-defined
175 sequence name. This specification then refers to those
176 messages not elements of the specified sequence name.
177 The default negation prefix is the exlamation mark `!',
178 but it may be change to any string, by defining the entry
179 `Sequence\-Negation' in the
182 For example, if the profile entry is:
185 Sequence\-Negation: not
190 command is given `notfoo' as a `msg' or
191 `msgs' argument, it would substitute all messages that are not elements
192 of the sequence `foo'.
194 Obviously, the user should beware of defining sequences with names that
195 begin with the value of the `Sequence\-Negation' profile entry.
196 The default value `!' was chosen due to its similar meaning in the C
197 programming language, and because it cannot be part of a user-defined
198 sequence. But if your shell provides history expansion,
199 you might need to quote the exlamation mark (prefix it with a backslash).
201 To deactivate the negation mechanism, define Sequence\-Negation in your
202 profile to an empty value.
204 .SS "The Previous Sequence"
206 provides the ability to remember the `msgs' or `msg' argument
209 command. The entry `Previous\-Sequence'
210 should be defined in the
212 profile; its value should be a sequence
213 name or multiple sequence names separated by spaces. If this entry
216 command finishes, it will define the
217 sequence(s) named in the value of this entry to be those messages that
218 were specified to the command. Hence, a profile entry of
221 Previous\-Sequence: pseq
226 command that accepts a `msg' or `msgs' argument to
227 define the sequence `pseq' as those messages when it finishes.
230 there can be a performance penalty in using the
231 `Previous\-Sequence' facility. If it is used,
234 programs have to write the sequence information to the
236 file for the folder each time they run. If the
237 `Previous\-Sequence' profile entry is not included, only
245 .SS "The Unseen Sequence"
246 Finally, the unseen sequence indicates which messages have not been
247 previously seen by the user.
255 Whenever new messages are placed in a folder (using
259 the new messages will also be added to the unseen sequence.
264 adds new messages to the unseen sequence.
265 Unlike the behavior of the previous sequence, however,
266 the unseen sequence will
276 display a message, that message will be removed from
279 The default unseen sequence is named `u'.
280 To change, define a `Unseen\-Sequence' entry in your profile.
281 It may also contain multiple sequence names, separated by spaces.
282 In this case, anything that applied to a single unseen sequence,
283 applies to multiple ones, too.
285 The unseen sequence mechanism is automatically activated.
286 To deactivate it, define the `Unseen\-Sequence' entry
287 in your profile with an empty value.
293 .ta \w'%etcdir%/ExtraBigFileName 'u
294 ^$HOME/.mmh/profile~^The user profile
295 ^$HOME/.mmh/context~^The user context
296 ^<folder>/\&.mh_sequences~^File for public sequences
299 .SH "PROFILE COMPONENTS"
303 .ta \w'ExtraBigProfileName 'u
304 ^Mh-Sequences:~^Name of file to store public sequences
305 ^Sequence\-Negation:~^To designate messages not in a sequence
306 ^Previous\-Sequence:~^The last message specification given
307 ^Unseen\-Sequence:~^Those messages not yet seen by the user
311 flist(1), mark(1), pick(1), mh-profile(5)