Commit | Line | Data |
---|---|---|
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 | |
5 | sortm \- sort messages | |
6 | .SY | |
7 | sortm | |
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 | |
16 | to the chronological order of the \*(lqDate:\*(rq field of each message. | |
29a3a89d C |
17 | |
18 | The `\-verbose' switch directs \fIsortm\fR to tell the user the general | |
19 | actions that it is taking to place the folder in sorted order. | |
20 | ||
21 | The `\-datefield\ field' switch tells \fIsortm\fR the name of the field | |
22 | to use when making the date comparison. | |
23 | If the user has a special field in each message, | |
24 | such as \*(lqBB\-Posted:\*(rq or \*(lqDelivery\-Date:\*(rq, | |
25 | then the `\-datefield' switch can be used to direct \fIsortm\fR which | |
26 | field to examine. | |
ad787160 C |
27 | |
28 | The `\-textfield\ field' switch causes \fIsortm\fR to sort messages by | |
29 | the specified text field. | |
30 | If this field is \*(lqsubject\*(rq, | |
31 | any leading "re:" is stripped off. | |
32 | In any case, all characters except letters and numbers are stripped | |
33 | and the resulting strings are sorted | |
34 | datefield\-major, textfield\-minor, | |
35 | using a case insensitive comparison. | |
36 | ||
37 | With `\-textfield\ field', | |
38 | if `\-limit\ days' is specified, messages with similar textfields | |
39 | that are dated within `days' of each other appear together. | |
40 | Specifying `\-nolimit' makes the limit infinity. | |
41 | With `\-limit 0', the sort is instead made textfield\-major, date\-minor. | |
42 | ||
43 | .\"Ex | |
44 | For example, to order a folder by date-major, subject-minor, use: | |
45 | ||
46 | .ti +.5i | |
47 | sortm -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 | |
56 | folder (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 |
70 | If a folder is given, it will become the current folder. | |
71 | If the current message is moved, \fIsortm\fR will preserve its status | |
72 | as current. | |
73 | .Hi | |
74 | Timezones used to be ignored when comparing dates: | |
75 | they aren't any more. | |
ad787160 C |
76 | |
77 | Messages which were in the folder, but not specified by `msgs', | |
78 | used to be moved to the end of the folder; | |
79 | now such messages are left untouched. | |
80 | ||
81 | Previously, | |
82 | \fIsortm\fR would try to fill any gaps in a folder within the | |
83 | range of messages it sorted. | |
84 | To improve performance, | |
85 | \fIsortm\fR now minimizes the number of message moves. | |
86 | To pack a folder, use | |
87 | \*(lq\fIfolder\ \-pack\fR\|\*(rq instead. | |
29a3a89d C |
88 | .Bu |
89 | If \fIsortm\fR encounters a message without a date\-field, | |
90 | or if the message has a date\-field that \fIsortm\fR cannot parse, | |
91 | then \fIsortm\fR attempts to keep the message in the same relative | |
92 | position. | |
93 | This does not always work. | |
94 | For instance, if the first message encountered lacks a date which can be | |
95 | parsed, | |
96 | then it will usually be placed at the end of the messages being sorted. | |
97 | ||
ad787160 | 98 | When \fIsortm\fR complains about a message which it can't temporally order, |
29a3a89d C |
99 | it complains about the message number \fIprior\fR to sorting. |
100 | It should indicate what the message number will be \fIafter\fR sorting. | |
101 | .En |