5 .TH MH-SEQUENCE %manext5% "%nmhdate%" MH.6.8 [%nmhversion%]
7 mh-sequence \- sequence specification for nmh message system
13 A sequence (or sequence set) is a symbolic name representing a
14 message or collection of messages.
16 has several internally
17 defined sequences, as well as allowing users to define their own
20 .SS "Message Specification and Pre\-Defined Message Sequences"
23 commands accept a `msg' or `msgs' specification, where
24 `msg' indicates one message and `msgs' indicates one or more messages.
25 To designate a message, you may use either its number (e.g., 1, 10, 234)
26 or one of these \*(lqreserved\*(rq message names:
32 first the first message in the folder
33 last the last message in the folder
34 cur the most recently accessed message
35 prev the message numerically preceding \*(lqcur\*(rq
36 next the message numerically following \*(lqcur\*(rq
40 In commands that take a `msg' argument, the default is \*(lqcur\*(rq.
41 As a shorthand, \*(lq\&.\*(rq is equivalent to \*(lqcur\*(rq.
43 For example: In a folder containing five messages numbered 5, 10, 94, 177
44 and 325, \*(lqfirst\*(rq is 5 and \*(lqlast\*(rq is 325. If \*(lqcur\*(rq
45 is 94, then \*(lqprev\*(rq is 10 and \*(lqnext\*(rq is 177.
47 The word `msgs' indicates that one or more messages may be specified.
48 Such a specification consists of one message designation or of several
49 message designations separated by spaces. A message designation consists
50 either of a message name as defined above, or a message range.
52 A message range is specified as \*(lqname1\-name2\*(rq or
53 \*(lqname:n\*(rq, where `name', `name1' and `name2' are message names,
54 and `n' is an integer.
56 The specification \*(lqname1\-name2\*(rq designates all currently existing
57 messages from `name1' to `name2' inclusive. The \*(lqreserved\*(rq
58 message name \*(lqall\*(rq is a shorthand for the message range
59 \*(lqfirst\-last\*(rq.
61 The specification \*(lqname:n\*(rq designates up to `n' messages.
62 These messages start with `name' if `name' is a message number or one of
63 the reserved names \*(lqfirst\*(rq \*(lqcur\*(rq, or \*(lqnext\*(rq, The
64 messages end with `name' if `name' is \*(lqprev\*(rq or \*(lqlast\*(rq.
65 The interpretation of `n' may be overridden by preceding `n' with a
66 plus or minus sign; `+n' always means up to `n' messages starting with
67 `name', and `\-n' always means up to `n' messages ending with `name'.
69 In commands which accept a `msgs' argument, the default is either
70 \*(lqcur\*(rq or \*(lqall\*(rq, depending on which makes more sense
71 for each command (see the individual man pages for details). Repeated
72 specifications of the same message have the same effect as a single
73 specification of the message.
75 There is also a special \*(lqreserved\*(rq message name \*(lqnew\*(rq
80 .SS "User\-Defined Message Sequences"
81 In addition to the \*(lqreserved\*(rq (pre-defined) message names given
84 supports user-defined sequence names. User-defined
87 user a tremendous amount of power in dealing
88 with groups of messages in the same folder by allowing the user to bind
89 a group of messages to a meaningful symbolic name.
91 The name used to denote a message sequence must consist of an alphabetic
92 character followed by zero or more alphanumeric characters, and can not
93 be one of the \*(lqreserved\*(rq message names above. After defining a
94 sequence, it can be used wherever an
96 command expects a `msg' or
99 Some forms of message ranges are allowed with user-defined sequences.
100 The specification \*(lqname:n\*(rq may be used, and it designates up
101 to the first `n' messages (or last `n' messages for `\-n') which are
102 elements of the user-defined sequence `name'.
104 The specifications \*(lqname:next\*(rq and \*(lqname:prev\*(rq may also
105 be used, and they designate the next or previous message (relative to the
106 current message) which is an element of the user-defined sequence `name'.
107 The specifications \*(lqname:first\*(rq and \*(lqname:last\*(rq are
108 equivalent to \*(lqname:1\*(rq and \*(lqname:\-1\*(rq, respectively. The
109 specification \*(lqname:cur\*(rq is not allowed (use just \*(lqcur\*(rq
110 instead). The syntax of these message range specifications is subject
111 to change in the future.
113 User-defined sequence names are specific to each folder. They are
120 .SS "Public and Private User-Defined Sequences"
121 There are two varieties of user-defined sequences:
122 public and private. Public sequences of a folder are accessible to any
124 user that can read that folder. They are kept in each folder
125 in the file determined by the \*(lqmh\-sequences\*(rq profile entry
127 .IR \&.mh\(rusequences ).
128 Private sequences are accessible
131 user that defined those sequences and are kept in
136 In general, the commands that create sequences (such as
140 will create public sequences if the folder for which
141 the sequences are being defined is writable by the
144 For most commands, this can be overridden by using the switches
148 But if the folder is read\-only, or if
149 the \*(lqmh\-sequences\*(rq profile entry is defined but empty, then
150 \fIprivate\fR sequences will be created instead.
152 .SS "Sequence Negation"
154 provides the ability to select all messages not elements of a
155 user-defined sequence. To do this, the user should define the entry
156 \*(lqSequence\-Negation\*(rq in the
158 profile file; its value
159 may be any string. This string is then used to preface an existing
160 user-defined sequence name. This specification then refers to those
161 messages not elements of the specified sequence name. For example, if
162 the profile entry is:
165 Sequence\-Negation: not
170 command is given \*(lqnotfoo\*(rq as a `msg' or
171 `msgs' argument, it would substitute all messages that are not elements
172 of the sequence \*(lqfoo\*(rq.
174 Obviously, the user should beware of defining sequences with names that
175 begin with the value of the \*(lqSequence\-Negation\*(rq profile entry.
177 .SS "The Previous Sequence"
179 provides the ability to remember the `msgs' or `msg' argument
182 command. The entry \*(lqPrevious\-Sequence\*(rq
183 should be defined in the
185 profile; its value should be a sequence
186 name or multiple sequence names separated by spaces. If this entry
187 is defined, when when an
189 command finishes, it will define the
190 sequence(s) named in the value of this entry to be those messages that
191 were specified to the command. Hence, a profile entry of
194 Previous\-Sequence: pseq
199 command that accepts a `msg' or `msgs' argument to
200 define the sequence \*(lqpseq\*(rq as those messages when it finishes.
203 there can be a performance penalty in using the
204 \*(lqPrevious\-Sequence\*(rq facility. If it is used,
207 programs have to write the sequence information to the
208 .I \&.mh\(rusequences
209 file for the folder each time they run. If the
210 \*(lqPrevious\-Sequence\*(rq profile entry is not included, only
215 .B \&.mh\(rusequences
218 .SS "The Unseen Sequence"
219 Finally, many users like to indicate which messages have not been
220 previously seen by them. The commands
227 honor the profile entry
228 \*(lqUnseen\-Sequence\*(rq to support this activity. This entry
231 should be defined as one or more sequence
232 names separated by spaces. If there is a value for
233 \*(lqUnseen\-Sequence\*(rq in the profile, then whenever new messages
234 are placed in a folder (using
238 the new messages will also be added to all the sequences named in this
239 profile entry. For example, a profile entry of
242 Unseen\-Sequence: unseen
247 to add new messages to the sequence \*(lqunseen\*(rq.
248 Unlike the behavior of the \*(lqPrevious\-Sequence\*(rq entry in the
249 profile, however, the sequence(s) will
260 displays a message, that message will be removed from
261 any sequences named by the \*(lqUnseen\-Sequence\*(rq entry in the
267 .ta \w'%etcdir%/ExtraBigFileName 'u
268 ^$HOME/\&.mh\(ruprofile~^The user profile
269 ^<mh\-dir>/context~^The user context
270 ^<folder>/\&.mh\(rusequences~^File for public sequences
273 .SH "PROFILE COMPONENTS"
277 .ta \w'ExtraBigProfileName 'u
278 ^mh-sequences:~^Name of file to store public sequences
279 ^Sequence\-Negation:~^To designate messages not in a sequence
280 ^Previous\-Sequence:~^The last message specification given
281 ^Unseen\-Sequence:~^Those messages not yet seen by the user
285 flist(1), mark(1), pick(1), mh-profile(5)