4 .TH MH-SEQUENCE %manext7% "%nmhdate%" MH.6.8 [%nmhversion%]
6 mh-sequence \- sequence specification for mh message system
8 A sequence (or sequence set) is a symbolic name representing a
9 message or collection of messages.
11 has several internally
12 defined sequences, as well as allowing users to define their own
15 .SS "Message Specification and Pre\-Defined Message Sequences"
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:
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
35 In commands that take a `msg' argument, the default is `c'.
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.
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.
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.
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
59 a all messages in the folder (i.e. `f\-l')
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'.
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).
76 specifications of the same message have the same effect as a single
77 specification of the message.
79 There is also a special `reserved' message name `b' (``beyond'')
80 which can be used with the
82 command. It refers to the next (not yet used) message number
89 b the next message number beyond `l'
93 .SS "User\-Defined Message Sequences"
94 In addition to the `reserved' (pre-defined) message names given
97 supports user-defined sequence names. User-defined
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.
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
109 command expects a `msg' or
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'.
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.
126 User-defined sequence names are specific to each folder. They are
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
137 user that can read that folder. They are kept in each folder
138 in the file determined by the `Mh\-Sequences' profile entry
140 .IR \&.mh_sequences ).
141 Private sequences are accessible
144 user that defined those sequences and are kept in
149 In general, the commands that create sequences (such as
153 will create public sequences if the folder for which
154 the sequences are being defined is writable by the
157 For most commands, this can be overridden by using the switches
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.
165 .SS "Sequence Negation"
167 provides the ability to select all messages
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
178 For example, if the profile entry is:
181 Sequence\-Negation: not
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'.
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).
197 To deactivate the negation mechanism, define Sequence\-Negation in your
198 profile to an empty value.
200 .SS "The Unseen Sequence"
201 Finally, the unseen sequence indicates which messages have not been
202 previously seen by the user.
210 Whenever new messages are placed in a folder (using
214 the new messages will also be added to the unseen sequence.
219 adds new messages to the unseen sequence.
220 The unseen sequence will
230 display a message, that message will be removed from
233 The default unseen sequence is named `u'.
234 To change, define a `Unseen\-Sequence' entry in your profile.
235 It may also contain multiple sequence names, separated by spaces.
236 In this case, anything that applied to a single unseen sequence,
237 applies to multiple ones, too.
239 The unseen sequence mechanism is automatically activated.
240 To deactivate it, define the `Unseen\-Sequence' entry
241 in your profile with an empty value.
247 .ta \w'%etcdir%/ExtraBigFileName 'u
248 ^$HOME/.mmh/profile~^The user profile
249 ^$HOME/.mmh/context~^The user context
250 ^<folder>/\&.mh_sequences~^File for public sequences
253 .SH "PROFILE COMPONENTS"
257 .ta \w'ExtraBigProfileName 'u
258 ^Mh-Sequences:~^Name of file to store public sequences
259 ^Sequence\-Negation:~^To designate messages not in a sequence
260 ^Unseen\-Sequence:~^Those messages not yet seen by the user
264 flist(1), mark(1), pick(1), mh-profile(5)
267 .SS Previous\-Sequence
268 This sequence stored the selected messages for the previous
271 It was disabled by default because it introduced a lot of extra writes to the
274 Additionally, it introduced possible race conditions when running multiple
276 commands in parallel.
277 As this feature was rarely used, it was removed.