source: trunk/third/nmh/man/mh-sequence.man @ 12455

Revision 12455, 9.0 KB checked in by danw, 26 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r12454, which included commits to RCS files with non-trunk default branches.
Line 
1.\"
2.\" %nmhwarning%
3.\" $Id: mh-sequence.man,v 1.1.1.1 1999-02-07 18:14:20 danw Exp $
4.\"
5.\" include the -mh macro file
6.so %etcdir%/tmac.h
7.\"
8.TH MH-SEQUENCE %manext5% MH.6.8 [%nmhversion%]
9.SH NAME
10mh-sequence \- sequence specification for nmh message system
11.SH SYNOPSIS
12.in +.5i
13.ti -.5i
14most \fInmh\fR commands
15.in -.5i
16.SH DESCRIPTION
17A sequence (or sequence set) is a symbolic name representing a
18message or collection of messages.  \fInmh\fP has several internally
19defined sequences, as well as allowing users to define their own
20sequences.
21
22.Uh "Message Specification and Pre\-Defined Message Sequences"
23Most \fInmh\fP commands accept a `msg' or `msgs' specification, where
24`msg' indicates one message and `msgs' indicates one or more messages.
25To designate a message, you may use either its number (e.g., 1, 10, 234)
26or one of these \*(lqreserved\*(rq message names:
27.in +.5i
28.sp 1
29.nf
30.ta +\w'\fIName\fP      'u
31\fIName\fP      \fIDescription\fR
32first   the first message in the folder
33last    the last message in the folder
34cur     the most recently accessed message
35prev    the message numerically preceding \*(lqcur\*(rq
36next    the message numerically following \*(lqcur\*(rq
37.re
38.fi
39.in -.5i
40
41In commands that take a `msg' argument, the default is \*(lqcur\*(rq.
42As a shorthand, \*(lq\&.\*(rq is equivalent to \*(lqcur\*(rq.
43
44For example: In a folder containing five messages numbered 5, 10, 94, 177
45and 325, \*(lqfirst\*(rq is 5 and \*(lqlast\*(rq is 325.  If \*(lqcur\*(rq
46is 94, then \*(lqprev\*(rq is 10 and \*(lqnext\*(rq is 177.
47
48The word `msgs' indicates that one or more messages may be specified.
49Such a specification consists of one message designation or of several
50message designations separated by spaces.  A message designation consists
51either of a message name as defined above, or a message range.
52
53A message range is specified as \*(lqname1\-name2\*(rq or
54\*(lqname:n\*(rq, where `name', `name1' and `name2' are message names,
55and `n' is an integer.
56
57The specification \*(lqname1\-name2\*(rq designates all currently existing
58messages from `name1' to `name2' inclusive.  The \*(lqreserved\*(rq
59message name \*(lqall\*(rq is a shorthand for the message range
60\*(lqfirst\-last\*(rq.
61
62The specification \*(lqname:n\*(rq designates up to `n' messages.
63These messages start with `name' if `name' is a message number or one of
64the reserved names \*(lqfirst\*(rq \*(lqcur\*(rq, or \*(lqnext\*(rq, The
65messages end with `name' if `name' is \*(lqprev\*(rq or \*(lqlast\*(rq.
66The interpretation of `n' may be overridden by preceding `n' with a
67plus or minus sign; `+n' always means up to `n' messages starting with
68`name', and `\-n' always means up to `n' messages ending with `name'.
69
70In commands which accept a `msgs' argument, the default is either
71\*(lqcur\*(rq or \*(lqall\*(rq, depending on which makes more sense
72for each command (see the individual man pages for details).  Repeated
73specifications of the same message have the same effect as a single
74specification of the message.
75
76There is also a special \*(lqreserved\*(rq message name \*(lqnew\*(rq
77which is used by the \fImhpath\fR command.
78
79.Uh "User\-Defined Message Sequences"
80In addition to the \*(lqreserved\*(rq (pre-defined) message names given
81above, \fInmh\fP supports user-defined sequence names.  User-defined
82sequences allow the \fInmh\fR user a tremendous amount of power in dealing
83with groups of messages in the same folder by allowing the user to bind
84a group of messages to a meaningful symbolic name.
85
86The name used to denote a message sequence must consist of an alphabetic
87character followed by zero or more alphanumeric characters, and can not
88be one of the \*(lqreserved\*(rq message names above.  After defining a
89sequence, it can be used wherever an \fInmh\fR command expects a `msg' or
90`msgs' argument.
91
92Some forms of message ranges are allowed with user-defined sequences.
93The specification \*(lqname:n\*(rq may be used, and it designates up
94to the first `n' messages (or last `n' messages for `\-n') which are
95elements of the user-defined sequence `name'.
96
97The specifications \*(lqname:next\*(rq and \*(lqname:prev\*(rq may also
98be used, and they designate the next or previous message (relative to the
99current message) which is an element of the user-defined sequence `name'.
100The specifications \*(lqname:first\*(rq and \*(lqname:last\*(rq are
101equivalent to \*(lqname:1\*(rq and \*(lqname:\-1\*(rq, respectively.  The
102specification \*(lqname:cur\*(rq is not allowed (use just \*(lqcur\*(rq
103instead).  The syntax of these message range specifications is subject
104to change in the future.
105
106User-defined sequence names are specific to each folder.  They are
107defined using the \fIpick\fP and \fImark\fP commands.
108
109.Uh "Public and Private User-Defined Sequences"
110There are two varieties of user-defined sequences: \fIpublic\fR and
111\fIprivate\fR.  \fIPublic\fR sequences of a folder are accessible to any
112\fInmh\fR user that can read that folder.  They are kept in each folder
113in the file determined by the \*(lqmh\-sequences\*(rq profile entry
114(default is \&.mh\(rusequences).  \fIPrivate\fR sequences are accessible
115only to the \fInmh\fR user that defined those sequences and are kept in
116the user's \fInmh\fR context file.
117
118In general, the commands that create sequences (such as \fIpick\fR and
119\fImark\fR) will create \fIpublic\fR sequences if the folder for which
120the sequences are being defined is writable by the \fInmh\fR user.
121For most commands, this can be overridden by using the switches
122`\-public' and `\-private'.  But if the folder is read\-only, or if
123the \*(lqmh\-sequences\*(rq profile entry is defined but empty, then
124\fIprivate\fR sequences will be created instead.
125
126.Uh "Sequence Negation"
127\fInmh\fP provides the ability to select all messages not elements of a
128user-defined sequence.  To do this, the user should define the entry
129\*(lqSequence\-Negation\*(rq in the \fInmh\fR profile file; its value
130may be any string.  This string is then used to preface an existing
131user-defined sequence name.  This specification then refers to those
132messages not elements of the specified sequence name.  For example, if
133the profile entry is:
134
135.ti +.5i
136Sequence\-Negation:\^ not
137
138then anytime an \fInmh\fR command is given \*(lqnotfoo\*(rq as a `msg' or
139`msgs' argument, it would substitute all messages that are not elements
140of the sequence \*(lqfoo\*(rq.
141
142Obviously, the user should beware of defining sequences with names that
143begin with the value of the \*(lqSequence\-Negation\*(rq profile entry.
144
145.Uh "The Previous Sequence"
146\fInmh\fR provides the ability to remember the `msgs' or `msg' argument
147last given to an \fInmh\fR command.  The entry \*(lqPrevious\-Sequence\*(rq
148should be defined in the \fInmh\fR profile; its value should be a sequence
149name or multiple sequence names separated by spaces.  If this entry
150is defined, when when an \fInmh\fP command finishes, it will define the
151sequence(s) named in the value of this entry to be those messages that
152were specified to the command.  Hence, a profile entry of
153
154.ti +.5i
155Previous\-Sequence:\^ pseq
156
157directs any \fInmh\fR command that accepts a `msg' or `msgs' argument to
158define the sequence \*(lqpseq\*(rq as those messages when it finishes.
159
160\fBNote:\fP there can be a performance penalty in using the
161\*(lqPrevious\-Sequence\*(rq facility.  If it is used, \fBall\fP
162\fInmh\fR programs have to write the sequence information to the
163\&.mh\(rusequences file for the folder each time they run.  If the
164\*(lqPrevious\-Sequence\*(rq profile entry is not included, only
165\fIpick\fR and \fImark\fR will write to the \&.mh\(rusequences file.
166
167.Uh "The Unseen Sequence"
168Finally, many users like to indicate which messages have not been
169previously seen by them.  The commands \fIinc\fR, \fIrcvstore\fR,
170\fIshow\fR, \fImhshow\fR, and \fIflist\fR honor the profile entry
171\*(lqUnseen\-Sequence\*(rq to support this activity.  This entry
172in the \&.mh\(ruprofile should be defined as one or more sequence
173names separated by spaces.  If there is a value for
174\*(lqUnseen\-Sequence\*(rq in the profile, then whenever new messages
175are placed in a folder (using \fIinc\fR or \fIrcvstore\fR), the
176new messages will also be added to all the sequences named in this
177profile entry.  For example, a profile entry of
178
179.ti +.5i
180Unseen\-Sequence:\^ unseen
181
182directs \fIinc\fR to add new messages to the sequence \*(lqunseen\*(rq.
183Unlike the behavior of the \*(lqPrevious\-Sequence\*(rq entry in the
184profile, however, the sequence(s) will \fBnot\fR be zeroed by \fIinc\fP.
185
186Similarly, whenever \fIshow\fR, \fImhshow\fR, \fInext\fR, or
187\fIprev\fR\^ displays a message, that message will be removed from
188any sequences named by the \*(lqUnseen\-Sequence\*(rq entry in the
189profile.
190
191.Fi
192^$HOME/\&.mh\(ruprofile~^The user profile
193^<mh\-dir>/context~^The user context
194^<folder>/\&.mh\(rusequences~^File for public sequences
195.Pr
196^mh-sequences:~^Name of file to store public sequences
197.Ps
198^Sequence\-Negation:~^To designate messages not in a sequence
199.Ps
200^Previous\-Sequence:~^The last message specification given
201.Ps
202^Unseen\-Sequence:~^Those messages not yet seen by the user
203.Sa
204flist(1), mark(1), pick(1), mh-profile(5)
205.De
206None
207.Co
208All
209.En
Note: See TracBrowser for help on using the repository browser.