-
-.Fi
-^$HOME/\&.mh\(ruprofile~^The user profile
-^<mh\-dir>/context~^The user context
-^<folder>/\&.mh\(rusequences~^File for public sequences
-.Pr
-^mh-sequences:~^Name of file to store public sequences
-.Ps
-^Sequence\-Negation:~^To designate messages not in a sequence
-.Ps
-^Previous\-Sequence:~^The last message specification given
-.Ps
-^Unseen\-Sequence:~^Those messages not yet seen by the user
-.Sa
-flist(1), mark(1), pick(1), mh-profile(5)
-.De
+.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
+nonexistent messages when the sequence file is updated. The exception to
+this is the \*(lqcur\*(rq sequence, which is allowed to point to a
+nonexistent 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
+.PD 0
+.TP 20
+$HOME/\&.mh\-profile
+The user's profile.
+.TP 20
+<mh\-dir>/context
+The user's context.
+.TP 20
+<folder>/\&.mh\-sequences
+File for public sequences.
+.PD
+.SH "PROFILE COMPONENTS"
+.PD 0
+.TP 20
+mh-sequences:
+Name of file to store public sequences.
+.TP 20
+Sequence\-Negation:
+To designate messages not in a sequence.
+.TP 20
+Previous\-Sequence:
+The last message specification given.
+.TP 20
+Unseen\-Sequence:
+Those messages not yet seen by the user.
+.PD
+.SH "SEE ALSO"
+.IR flist (1),
+.IR mark (1),
+.IR pick (1),
+.IR mh-profile (5)
+.SH DEFAULTS