]> diplodocus.org Git - nmh/blobdiff - man/mh-sequence.man
Test to make sure mhshow is actually invoking a charset conversion
[nmh] / man / mh-sequence.man
index f4093a28228050fdeb78cf2682fac65e92098f21..0f876e97dfd9aa7f84f1c44c89fdcf10bc5085ed 100644 (file)
@@ -1,13 +1,9 @@
-.TH MH-SEQUENCE %manext5% "%nmhdate%" MH.6.8 [%nmhversion%]
+.TH MH-SEQUENCE %manext5% "June 11, 2013" "%nmhversion%"
 .\"
 .\" %nmhwarning%
 .\"
 .SH NAME
 mh-sequence \- sequence specification for nmh message system
 .\"
 .\" %nmhwarning%
 .\"
 .SH NAME
 mh-sequence \- sequence specification for nmh message system
-.SH SYNOPSIS
-most
-.B nmh
-commands
 .SH DESCRIPTION
 A sequence (or sequence set) is a symbolic name representing a
 message or collection of messages.
 .SH DESCRIPTION
 A sequence (or sequence set) is a symbolic name representing a
 message or collection of messages.
@@ -15,7 +11,6 @@ message or collection of messages.
 has several internally
 defined sequences, as well as allowing users to define their own
 sequences.
 has several internally
 defined sequences, as well as allowing users to define their own
 sequences.
-
 .SS "Message Specification and Pre\-Defined Message Sequences"
 Most
 .B nmh
 .SS "Message Specification and Pre\-Defined Message Sequences"
 Most
 .B nmh
@@ -45,7 +40,7 @@ is 94, then \*(lqprev\*(rq is 10 and \*(lqnext\*(rq is 177.
 .PP
 The word `msgs' indicates that one or more messages may be specified.
 Such a specification consists of one message designation or of several
 .PP
 The word `msgs' indicates that one or more messages may be specified.
 Such a specification consists of one message designation or of several
-message designations separated by spaces.  A message designation consists
+message designations, as separate arguments.  A message designation consists
 either of a message name as defined above, or a message range.
 .PP
 A message range is specified as \*(lqname1\-name2\*(rq or
 either of a message name as defined above, or a message range.
 .PP
 A message range is specified as \*(lqname1\-name2\*(rq or
@@ -65,6 +60,14 @@ The interpretation of `n' may be overridden by preceding `n' with a
 plus or minus sign; `+n' always means up to `n' messages starting with
 `name', and `\-n' always means up to `n' messages ending with `name'.
 .PP
 plus or minus sign; `+n' always means up to `n' messages starting with
 `name', and `\-n' always means up to `n' messages ending with `name'.
 .PP
+Substituting `=' for `:' (i.e., \*(lqname=n\*(rq) will reduce the
+selection from a range of up to `n' messages, to a selection of
+just the `n'th message.  So for example, while \*(lqname:-3\*(rq
+selects the 3 messages ending with `name', \*(lqname=-3\*(rq selects
+just the 2nd previous message.  It is an error if the requested
+message does not exist (i.e., there aren't enough messages in the
+folder).
+.PP 
 In commands which accept a `msgs' argument, the default is either
 \*(lqcur\*(rq or \*(lqall\*(rq, depending on which makes more sense
 for each command (see the individual man pages for details).  Repeated
 In commands which accept a `msgs' argument, the default is either
 \*(lqcur\*(rq or \*(lqall\*(rq, depending on which makes more sense
 for each command (see the individual man pages for details).  Repeated
@@ -75,7 +78,6 @@ There is also a special \*(lqreserved\*(rq message name \*(lqnew\*(rq
 which is used by the
 .B mhpath
 command.
 which is used by the
 .B mhpath
 command.
-
 .SS "User\-Defined Message Sequences"
 In addition to the \*(lqreserved\*(rq (pre-defined) message names given
 above,
 .SS "User\-Defined Message Sequences"
 In addition to the \*(lqreserved\*(rq (pre-defined) message names given
 above,
@@ -109,6 +111,15 @@ specification \*(lqname:cur\*(rq is not allowed (use just \*(lqcur\*(rq
 instead).  The syntax of these message range specifications is subject
 to change in the future.
 .PP
 instead).  The syntax of these message range specifications is subject
 to change in the future.
 .PP
+Single messages (as opposed to ranges) may also be selected by
+substituting `=' for `:', as in \*(lqname=n\*(rq.  This will reduce
+the selection from being a range of up to `n' messages, to being a
+selection of just the `n'th message.  So while \*(lqseq:5\*(rq
+selects the first 5 messages of seqence `seq', \*(lqseq=5\*(rq
+selects just the 5th message of the sequence.  It is
+an error if the requested message does not exist (i.e., there aren't
+at least `n' messages in the sequence).
+.PP
 User-defined sequence names are specific to each folder.  They are
 defined using the
 .B pick
 User-defined sequence names are specific to each folder.  They are
 defined using the
 .B pick
@@ -147,7 +158,6 @@ and
 But if the folder is read\-only, or if
 the \*(lqmh\-sequences\*(rq profile entry is defined but empty, then
 \fIprivate\fR sequences will be created instead.
 But if the folder is read\-only, or if
 the \*(lqmh\-sequences\*(rq profile entry is defined but empty, then
 \fIprivate\fR sequences will be created instead.
-
 .SS "Sequence Negation"
 .B Nmh
 provides the ability to select all messages not elements of a
 .SS "Sequence Negation"
 .B Nmh
 provides the ability to select all messages not elements of a
@@ -172,7 +182,6 @@ of the sequence \*(lqfoo\*(rq.
 .PP
 Obviously, the user should beware of defining sequences with names that
 begin with the value of the \*(lqSequence\-Negation\*(rq profile entry.
 .PP
 Obviously, the user should beware of defining sequences with names that
 begin with the value of the \*(lqSequence\-Negation\*(rq profile entry.
-
 .SS "The Previous Sequence"
 .B Nmh
 provides the ability to remember the `msgs' or `msg' argument
 .SS "The Previous Sequence"
 .B Nmh
 provides the ability to remember the `msgs' or `msg' argument
@@ -182,7 +191,7 @@ command.  The entry \*(lqPrevious\-Sequence\*(rq
 should be defined in the
 .B nmh
 profile; its value should be a sequence
 should be defined in the
 .B nmh
 profile; its value should be a sequence
-name or multiple sequence names separated by spaces.  If this entry
+name or multiple sequence names, as separate arguments.  If this entry
 is defined, when when an
 .B nmh
 command finishes, it will define the
 is defined, when when an
 .B nmh
 command finishes, it will define the
@@ -213,7 +222,6 @@ and
 will write to the
 .B \&.mh\(rusequences
 file.
 will write to the
 .B \&.mh\(rusequences
 file.
-
 .SS "The Unseen Sequence"
 Finally, many users like to indicate which messages have not been
 previously seen by them.  The commands
 .SS "The Unseen Sequence"
 Finally, many users like to indicate which messages have not been
 previously seen by them.  The commands
@@ -228,7 +236,7 @@ honor the profile entry
 in the
 .I \&.mh\(ruprofile
 should be defined as one or more sequence
 in the
 .I \&.mh\(ruprofile
 should be defined as one or more sequence
-names separated by spaces.  If there is a value for
+names, as separate arguments.  If there is a value for
 \*(lqUnseen\-Sequence\*(rq in the profile, then whenever new messages
 are placed in a folder (using
 .B inc
 \*(lqUnseen\-Sequence\*(rq in the profile, then whenever new messages
 are placed in a folder (using
 .B inc
@@ -259,7 +267,58 @@ or
 displays a message, that message will be removed from
 any sequences named by the \*(lqUnseen\-Sequence\*(rq entry in the
 profile.
 displays a message, that message will be removed from
 any sequences named by the \*(lqUnseen\-Sequence\*(rq entry in the
 profile.
-
+.SS Sequence File Format
+The sequence file format is based on the RFC\-5322 message format.  Each line
+of the sequence file corresponds to one sequence.  The line starts with the
+sequence name followed by a `:', then followed by a space-separated list of message numbers
+that correspond to messages that are part of the named sequence.  A contiguous
+range of messages can be represented as \*(lqlownum\-highnum\*(rq.
+.PP
+.B Sample sequence file
+.PP
+.RS 5
+.nf
+work: 3 6 8 22-33 46
+unseen: 47 49-51 54
+cur: 46
+.fi
+.RE
+.PP
+.B Nmh
+commands that modify the sequence file will silently remove sequences for
+nonexistant messages when the sequence file is updated.  The exception to 
+this is the \*(lqcur\*(rq sequence, which is allowed to point to a
+nonexistant message.
+.SS Sequence File Locking
+The \*(lqdatalocking\*(rq profile entry controls the type of locking used
+when reading and writing sequence files.  The locking mechanisms supported
+are detailed in
+.IR mh\-profile (5).
+This protects sequence file integrity when multiple
+.B nmh
+commands are run simultaneously.
+.B Nmh
+commands that modify the sequence file use transactional locks; the lock
+is held from the time the sequence file is read until it it written out.
+This ensures that modifications to the sequence file will not be lost
+if multiple commands are run simultaneously.  Long\-running
+.B nmh
+commands, such as
+.B inc
+and
+.BR pick ,
+will release the sequence lock during the bulk of their runtime and reread
+the sequence file after their processing is complete to reduce lock
+contention time.
+.PP
+.B Note:
+Currently transactional locks are
+.B only
+supported for public sequences; private sequences will not get corrupted, but
+the possibility exists that two
+.B nmh
+commands run simultaneously that add messages to a private sequence could result in
+one command's messages not appearing on the requested sequence.
 .SH FILES
 .fc ^ ~
 .nf
 .SH FILES
 .fc ^ ~
 .nf
@@ -268,7 +327,6 @@ profile.
 ^<mh\-dir>/context~^The user context
 ^<folder>/\&.mh\(rusequences~^File for public sequences
 .fi
 ^<mh\-dir>/context~^The user context
 ^<folder>/\&.mh\(rusequences~^File for public sequences
 .fi
-
 .SH "PROFILE COMPONENTS"
 .fc ^ ~
 .nf
 .SH "PROFILE COMPONENTS"
 .fc ^ ~
 .nf
@@ -279,9 +337,10 @@ profile.
 ^Previous\-Sequence:~^The last message specification given
 ^Unseen\-Sequence:~^Those messages not yet seen by the user
 .fi
 ^Previous\-Sequence:~^The last message specification given
 ^Unseen\-Sequence:~^Those messages not yet seen by the user
 .fi
-
 .SH "SEE ALSO"
 .SH "SEE ALSO"
-flist(1), mark(1), pick(1), mh-profile(5)
-
+.IR flist (1),
+.IR mark (1),
+.IR pick (1),
+.IR mh-profile (5)
 .SH DEFAULTS
 None
 .SH DEFAULTS
 None