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 first the first message in the folder
32 last the last message in the folder
33 cur the most recently accessed message
34 prev the message numerically preceding `cur'
35 next the message numerically following `cur'
39 In commands that take a `msg' argument, the default is `cur'.
40 As a shorthand, `\&.' is equivalent to `cur'.
42 For example: In a folder containing five messages numbered 5, 10, 94, 177
43 and 325, `first' is 5 and `last' is 325. If `cur'
44 is 94, then `prev' is 10 and `next' is 177.
46 The word `msgs' indicates that one or more messages may be specified.
47 Such a specification consists of one message designation or of several
48 message designations separated by spaces. A message designation consists
49 either of a message name as defined above, or a message range.
51 A message range is specified as `name1\-name2' or
52 `name:n', where `name', `name1' and `name2' are message names,
53 and `n' is an integer.
55 The specification `name1\-name2' designates all currently existing
56 messages from `name1' to `name2' inclusive. The `reserved'
57 message name `all' is a shorthand for the message range
60 The specification `name:n' designates up to `n' messages.
61 These messages start with `name' if `name' is a message number or one of
62 the reserved names `first' `cur', or `next', The
63 messages end with `name' if `name' is `prev' or `last'.
64 The interpretation of `n' may be overridden by preceding `n' with a
65 plus or minus sign; `+n' always means up to `n' messages starting with
66 `name', and `\-n' always means up to `n' messages ending with `name'.
68 In commands which accept a `msgs' argument, the default is either
69 `cur' or `all', depending on which makes more sense
70 for each command (see the individual man pages for details). Repeated
71 specifications of the same message have the same effect as a single
72 specification of the message.
74 There is also a special `reserved' message name `new'
79 .SS "User\-Defined Message Sequences"
80 In addition to the `reserved' (pre-defined) message names given
83 supports user-defined sequence names. User-defined
86 user a tremendous amount of power in dealing
87 with groups of messages in the same folder by allowing the user to bind
88 a group of messages to a meaningful symbolic name.
90 The name used to denote a message sequence must consist of an alphabetic
91 character followed by zero or more alphanumeric characters, and can not
92 be one of the `reserved' message names above. After defining a
93 sequence, it can be used wherever an
95 command expects a `msg' or
98 Some forms of message ranges are allowed with user-defined sequences.
99 The specification `name:n' may be used, and it designates up
100 to the first `n' messages (or last `n' messages for `\-n') which are
101 elements of the user-defined sequence `name'.
103 The specifications `name:next' and `name:prev' may also
104 be used, and they designate the next or previous message (relative to the
105 current message) which is an element of the user-defined sequence `name'.
106 The specifications `name:first' and `name:last' are
107 equivalent to `name:1' and `name:\-1', respectively. The
108 specification `name:cur' is not allowed (use just `cur'
109 instead). The syntax of these message range specifications is subject
110 to change in the future.
112 User-defined sequence names are specific to each folder. They are
119 .SS "Public and Private User-Defined Sequences"
120 There are two varieties of user-defined sequences:
121 public and private. Public sequences of a folder are accessible to any
123 user that can read that folder. They are kept in each folder
124 in the file determined by the `Mh\-Sequences' profile entry
126 .IR \&.mh_sequences ).
127 Private sequences are accessible
130 user that defined those sequences and are kept in
135 In general, the commands that create sequences (such as
139 will create public sequences if the folder for which
140 the sequences are being defined is writable by the
143 For most commands, this can be overridden by using the switches
147 But if the folder is read\-only, or if
148 the `Mh\-Sequences' profile entry is defined but empty, then
149 \fIprivate\fR sequences will be created instead.
151 .SS "Sequence Negation"
153 provides the ability to select all messages
155 elements of a user-defined sequence.
156 A special string is used to preface an existing user-defined
157 sequence name. This specification then refers to those
158 messages not elements of the specified sequence name.
159 The default negation prefix is the exlamation mark `!',
160 but it may be change to any string, by defining the entry
161 `Sequence\-Negation' in the
164 For example, if the profile entry is:
167 Sequence\-Negation: not
172 command is given `notfoo' as a `msg' or
173 `msgs' argument, it would substitute all messages that are not elements
174 of the sequence `foo'.
176 Obviously, the user should beware of defining sequences with names that
177 begin with the value of the `Sequence\-Negation' profile entry.
178 The default value `!' was chosen due to its similar meaning in the C
179 programming language, and because it cannot be part of a user-defined
180 sequence. But if your shell provides history expansion,
181 you might need to quote the exlamation mark (prefix it with a backslash).
183 To deactivate the negation mechanism, define Sequence\-Negation in your
184 profile to an empty value.
186 .SS "The Previous Sequence"
188 provides the ability to remember the `msgs' or `msg' argument
191 command. The entry `Previous\-Sequence'
192 should be defined in the
194 profile; its value should be a sequence
195 name or multiple sequence names separated by spaces. If this entry
198 command finishes, it will define the
199 sequence(s) named in the value of this entry to be those messages that
200 were specified to the command. Hence, a profile entry of
203 Previous\-Sequence: pseq
208 command that accepts a `msg' or `msgs' argument to
209 define the sequence `pseq' as those messages when it finishes.
212 there can be a performance penalty in using the
213 `Previous\-Sequence' facility. If it is used,
216 programs have to write the sequence information to the
218 file for the folder each time they run. If the
219 `Previous\-Sequence' profile entry is not included, only
227 .SS "The Unseen Sequence"
228 Finally, the unseen sequence indicates which messages have not been
229 previously seen by the user.
237 Whenever new messages are placed in a folder (using
241 the new messages will also be added to the unseen sequence.
246 adds new messages to the unseen sequence.
247 Unlike the behavior of the previous sequence, however,
248 the unseen sequence will
258 display a message, that message will be removed from
261 The default unseen sequence is named `u'.
262 To change, define a `Unseen\-Sequence' entry in your profile.
263 It may also contain multiple sequence names, separated by spaces.
264 In this case, anything that applied to a single unseen sequence,
265 applies to multiple ones, too.
267 The unseen sequence mechanism is automatically activated.
268 To deactivate it, define the `Unseen\-Sequence' entry
269 in your profile with an empty value.
275 .ta \w'%etcdir%/ExtraBigFileName 'u
276 ^$HOME/.mmh/profile~^The user profile
277 ^$HOME/.mmh/context~^The user context
278 ^<folder>/\&.mh_sequences~^File for public sequences
281 .SH "PROFILE COMPONENTS"
285 .ta \w'ExtraBigProfileName 'u
286 ^Mh-Sequences:~^Name of file to store public sequences
287 ^Sequence\-Negation:~^To designate messages not in a sequence
288 ^Previous\-Sequence:~^The last message specification given
289 ^Unseen\-Sequence:~^Those messages not yet seen by the user
293 flist(1), mark(1), pick(1), mh-profile(5)