BSD 4_4 release
[unix-history] / usr / src / contrib / mh-6.8 / conf / doc / sortm.rf
CommitLineData
ad787160
C
1.\" @(MHWARNING)
2.\" @(#)$Id: sortm.rf,v 1.8 90/04/05 15:15:26 sources Exp $
29a3a89d
C
3.SC SORTM 1
4.NA
5sortm \- sort messages
6.SY
7sortm
8\%[+folder] \%[msgs]
9\%[\-datefield\ field]
ad787160
C
10\%[\-textfield\ field] \%[\-notextfield]
11\%[\-limit days] \%[\-nolimit]
29a3a89d
C
12\%[\-verbose] \%[\-noverbose]
13\%[\-help]
14.DE
15\fISortm\fR sorts the specified messages in the named folder according
16to the chronological order of the \*(lqDate:\*(rq field of each message.
29a3a89d
C
17
18The `\-verbose' switch directs \fIsortm\fR to tell the user the general
19actions that it is taking to place the folder in sorted order.
20
21The `\-datefield\ field' switch tells \fIsortm\fR the name of the field
22to use when making the date comparison.
23If the user has a special field in each message,
24such as \*(lqBB\-Posted:\*(rq or \*(lqDelivery\-Date:\*(rq,
25then the `\-datefield' switch can be used to direct \fIsortm\fR which
26field to examine.
ad787160
C
27
28The `\-textfield\ field' switch causes \fIsortm\fR to sort messages by
29the specified text field.
30If this field is \*(lqsubject\*(rq,
31any leading "re:" is stripped off.
32In any case, all characters except letters and numbers are stripped
33and the resulting strings are sorted
34datefield\-major, textfield\-minor,
35using a case insensitive comparison.
36
37With `\-textfield\ field',
38if `\-limit\ days' is specified, messages with similar textfields
39that are dated within `days' of each other appear together.
40Specifying `\-nolimit' makes the limit infinity.
41With `\-limit 0', the sort is instead made textfield\-major, date\-minor.
42
43.\"Ex
44For example, to order a folder by date-major, subject-minor, use:
45
46.ti +.5i
47sortm -textfield subject +folder
48
29a3a89d
C
49.Fi
50^$HOME/\&.mh\(ruprofile~^The user profile
51.Pr
52^Path:~^To determine the user's MH directory
53.Ps
54^Current\-Folder:~^To find the default current folder
55.Sa
56folder (1)
57.De
58`+folder' defaults to the current folder
59.Ds
60`msgs' defaults to all
61.Ds
62`\-datefield date'
63.Ds
ad787160
C
64`\-notextfield'
65.Ds
29a3a89d 66`\-noverbose'
ad787160
C
67.Ds
68`\-nolimit'
29a3a89d
C
69.Co
70If a folder is given, it will become the current folder.
71If the current message is moved, \fIsortm\fR will preserve its status
72as current.
73.Hi
74Timezones used to be ignored when comparing dates:
75they aren't any more.
ad787160
C
76
77Messages which were in the folder, but not specified by `msgs',
78used to be moved to the end of the folder;
79now such messages are left untouched.
80
81Previously,
82\fIsortm\fR would try to fill any gaps in a folder within the
83range of messages it sorted.
84To improve performance,
85\fIsortm\fR now minimizes the number of message moves.
86To pack a folder, use
87\*(lq\fIfolder\ \-pack\fR\|\*(rq instead.
29a3a89d
C
88.Bu
89If \fIsortm\fR encounters a message without a date\-field,
90or if the message has a date\-field that \fIsortm\fR cannot parse,
91then \fIsortm\fR attempts to keep the message in the same relative
92position.
93This does not always work.
94For instance, if the first message encountered lacks a date which can be
95parsed,
96then it will usually be placed at the end of the messages being sorted.
97
ad787160 98When \fIsortm\fR complains about a message which it can't temporally order,
29a3a89d
C
99it complains about the message number \fIprior\fR to sorting.
100It should indicate what the message number will be \fIafter\fR sorting.
101.En