1MH-SEQUENCE(5)               [nmh-1.2-20070115cvs]              MH-SEQUENCE(5)
2
3
4

NAME

6       mh-sequence - sequence specification for nmh message system
7

SYNOPSIS

9       most nmh commands
10

DESCRIPTION

12       A  sequence (or sequence set) is a symbolic name representing a message
13       or  collection  of  messages.   nmh  has  several  internally   defined
14       sequences, as well as allowing users to define their own sequences.
15
16
17   Message Specification and Pre-Defined Message Sequences
18       Most  nmh  commands accept a `msg' or `msgs' specification, where `msg'
19       indicates one message and `msgs' indicates one or  more  messages.   To
20       designate  a  message, you may use either its number (e.g., 1, 10, 234)
21       or one of these “reserved” message names:
22
23            Name      Description
24            first     the first message in the folder
25            last      the last message in the folder
26            cur       the most recently accessed message
27            prev      the message numerically preceding “cur”
28            next      the message numerically following “cur”
29
30       In commands that take a `msg' argument, the default  is  “cur”.   As  a
31       shorthand, “.” is equivalent to “cur”.
32
33       For  example:  In a folder containing five messages numbered 5, 10, 94,
34       177 and 325, “first” is 5 and “last” is 325.   If  “cur”  is  94,  then
35       “prev” is 10 and “next” is 177.
36
37       The  word  `msgs' indicates that one or more messages may be specified.
38       Such a specification consists of one message designation or of  several
39       message  designations  separated by spaces.  A message designation con‐
40       sists either of a message name as defined above, or a message range.
41
42       A message range  is  specified  as  “name1-name2”  or  “name:n”,  where
43       `name', `name1' and `name2' are message names, and `n' is an integer.
44
45       The  specification “name1-name2” designates all currently existing mes‐
46       sages from `name1' to `name2' inclusive.  The “reserved”  message  name
47       “all” is a shorthand for the message range “first-last”.
48
49       The  specification  “name:n” designates up to `n' messages.  These mes‐
50       sages start with `name' if `name' is a message number  or  one  of  the
51       reserved  names  “first” “cur”, or “next”, The messages end with `name'
52       if `name' is “prev” or “last”.  The interpretation of `n' may be  over‐
53       ridden by preceding `n' with a plus or minus sign; `+n' always means up
54       to `n' messages starting with `name', and `-n' always means up  to  `n'
55       messages ending with `name'.
56
57       In commands which accept a `msgs' argument, the default is either “cur”
58       or “all”, depending on which makes more sense for each command (see the
59       individual man pages for details).  Repeated specifications of the same
60       message have the same effect as a single specification of the message.
61
62       There is also a special “reserved” message name “new” which is used  by
63       the mhpath command.
64
65
66   User-Defined Message Sequences
67       In  addition to the “reserved” (pre-defined) message names given above,
68       nmh supports user-defined sequence names.  User-defined sequences allow
69       the  nmh  user  a  tremendous amount of power in dealing with groups of
70       messages in the same folder by allowing the user to  bind  a  group  of
71       messages to a meaningful symbolic name.
72
73       The  name  used  to denote a message sequence must consist of an alpha‐
74       betic character followed by zero or more alphanumeric  characters,  and
75       can not be one of the “reserved” message names above.  After defining a
76       sequence, it can be used wherever an nmh command  expects  a  `msg'  or
77       `msgs' argument.
78
79       Some  forms  of message ranges are allowed with user-defined sequences.
80       The specification “name:n” may be used, and it  designates  up  to  the
81       first  `n'  messages (or last `n' messages for `-n') which are elements
82       of the user-defined sequence `name'.
83
84       The specifications “name:next” and “name:prev” may also  be  used,  and
85       they  designate  the  next or previous message (relative to the current
86       message) which is an element of the user-defined sequence `name'.   The
87       specifications  “name:first” and “name:last” are equivalent to “name:1”
88       and “name:-1”,  respectively.   The  specification  “name:cur”  is  not
89       allowed  (use  just  “cur” instead).  The syntax of these message range
90       specifications is subject to change in the future.
91
92       User-defined sequence names are specific  to  each  folder.   They  are
93       defined using the pick and mark commands.
94
95   Public and Private User-Defined Sequences
96       There  are two varieties of user-defined sequences: public and private.
97       Public sequences of a folder are accessible to any nmh  user  that  can
98       read  that folder.  They are kept in each folder in the file determined
99       by the “mh-sequences” profile entry (default is  .mh_sequences).   Pri‐
100       vate  sequences  are accessible only to the nmh user that defined those
101       sequences and are kept in the user's nmh context file.
102
103       In general, the commands that create sequences (such as pick and  mark)
104       will  create public sequences if the folder for which the sequences are
105       being defined is writable by the nmh user.  For most commands, this can
106       be  overridden  by using the switches -public and -private.  But if the
107       folder is read-only, or if the “mh-sequences” profile entry is  defined
108       but empty, then private sequences will be created instead.
109
110
111   Sequence Negation
112       Nmh provides the ability to select all messages not elements of a user-
113       defined sequence.  To  do  this,  the  user  should  define  the  entry
114       “Sequence-Negation”  in  the  nmh  profile  file;  its value may be any
115       string.  This string is then used to preface an  existing  user-defined
116       sequence  name.   This  specification then refers to those messages not
117       elements of the specified sequence name.  For example, if  the  profile
118       entry is:
119
120            Sequence-Negation: not
121
122       then  anytime  an  nmh  command  is given “notfoo” as a `msg' or `msgs'
123       argument, it would substitute all messages that are not elements of the
124       sequence “foo”.
125
126       Obviously, the user should beware of defining sequences with names that
127       begin with the value of the “Sequence-Negation” profile entry.
128
129
130   The Previous Sequence
131       Nmh provides the ability to remember the `msgs' or `msg' argument  last
132       given  to  an  nmh  command.   The  entry “Previous-Sequence” should be
133       defined in the nmh profile; its value should be a sequence name or mul‐
134       tiple  sequence  names  separated by spaces.  If this entry is defined,
135       when when an nmh command finishes, it will define the sequence(s) named
136       in  the value of this entry to be those messages that were specified to
137       the command.  Hence, a profile entry of
138
139            Previous-Sequence: pseq
140
141       directs any nmh command that accepts a  `msg'  or  `msgs'  argument  to
142       define the sequence “pseq” as those messages when it finishes.
143
144       Note:  there  can  be  a  performance  penalty  in  using  the  “Previ‐
145       ous-Sequence” facility.  If it is used, all nmh programs have to  write
146       the  sequence information to the .mh_sequences file for the folder each
147       time they  run.   If  the  “Previous-Sequence”  profile  entry  is  not
148       included, only pick and mark will write to the .mh_sequences file.
149
150
151   The Unseen Sequence
152       Finally,  many users like to indicate which messages have not been pre‐
153       viously seen by them.  The commands inc, rcvstore,  show,  mhshow,  and
154       flist  honor the profile entry “Unseen-Sequence” to support this activ‐
155       ity.  This entry in the .mh_profile should be defined as  one  or  more
156       sequence   names  separated  by  spaces.   If  there  is  a  value  for
157       “Unseen-Sequence” in the profile, then whenever new messages are placed
158       in  a  folder  (using  inc  or rcvstore), the new messages will also be
159       added to all the sequences named in this profile entry.  For example, a
160       profile entry of
161
162            Unseen-Sequence: unseen
163
164       directs  inc  to add new messages to the sequence “unseen”.  Unlike the
165       behavior of the “Previous-Sequence” entry in the profile, however,  the
166       sequence(s) will not be zeroed by inc.
167
168       Similarly,  whenever  show,  mhshow,  next, or prev displays a message,
169       that  message  will  be  removed  from  any  sequences  named  by   the
170       “Unseen-Sequence” entry in the profile.
171
172

FILES

174       $HOME/.mh_profile          The user profile
175       <mh-dir>/context           The user context
176       <folder>/.mh_sequences     File for public sequences
177
178

PROFILE COMPONENTS

180       mh-sequences:        Name of file to store public sequences
181       Sequence-Negation:   To designate messages not in a sequence
182       Previous-Sequence:   The last message specification given
183       Unseen-Sequence:     Those messages not yet seen by the user
184
185

SEE ALSO

187       flist(1), mark(1), pick(1), mh-profile(5)
188
189

DEFAULTS

191       None
192
193
194
195MH.6.8                            1 Jul 2003                    MH-SEQUENCE(5)
Impressum