remove unused defines in uip/pick.c
[mmh] / man / sortm.man1
1 .\"
2 .\" %nmhwarning%
3 .\"
4 .TH SORTM %manext1% "%nmhdate%" MH.6.8 [%nmhversion%]
5 .SH NAME
6 sortm \- sort messages
7 .SH SYNOPSIS
8 .HP 5
9 .na
10 .B sortm
11 .RI [ +folder ]
12 .RI [ msgs ]
13 .RB [ \-datefield
14 .IR field ]
15 .RB [ \-textfield
16 .IR field ]
17 .RB [ \-notextfield ]
18 .RB [ \-limit
19 .IR days ]
20 .RB [ \-nolimit ]
21 .RB [ \-verbose " | " \-noverbose ]
22 .RB [ \-Version ]
23 .RB [ \-help ]
24 .ad
25 .SH DESCRIPTION
26 .B Sortm
27 sorts the specified messages in the named folder according
28 to the chronological order of the `Date:' field of each message.
29 .PP
30 The
31 .B \-verbose
32 switch directs
33 .B sortm
34 to tell the user the general
35 actions that it is taking to place the folder in sorted order.
36 .PP
37 The
38 .B \-datefield
39 .I field
40 switch tells
41 .B sortm
42 the name of the field to
43 use when making the date comparison.  If the user has a special field in
44 each message, such as `BB\-Posted:' or `Delivery\-Date:',
45 then the
46 .B \-datefield
47 switch can be used to direct
48 .B sortm
49 which field to examine.
50 .PP
51 The
52 .B \-textfield
53 .I field
54 switch causes
55 .B sortm
56 to sort messages
57 by the specified text field.  If this field is `subject', any
58 leading "re:" is stripped off.  In any case, all characters except
59 letters and numbers are stripped and the resulting strings are sorted
60 datefield\-major, textfield\-minor, using a case insensitive comparison.
61 .PP
62 With
63 .B \-textfield
64 .IR field ,
65 if
66 .B \-limit
67 .I days
68 is specified, messages
69 with similar textfields that are dated within `days' of each other
70 appear together.  Specifying
71 .B \-nolimit
72 makes the limit infinity.
73 With
74 .B \-limit
75 .IR 0 ,
76 the sort is instead made textfield\-major, date\-minor.
77 .PP
78 For example, to order a folder by date-major, subject-minor, use:
79 .PP
80 .RS 5
81 sortm \-textfield subject +folder
82 .RE
83
84 .SH FILES
85 .fc ^ ~
86 .nf
87 .ta \w'%etcdir%/ExtraBigFileName  'u
88 ^$HOME/.mmh/profile~^The user profile
89 .fi
90
91 .SH "PROFILE COMPONENTS"
92 .fc ^ ~
93 .nf
94 .ta 2.4i
95 .ta \w'ExtraBigProfileName  'u
96 ^Path:~^To determine the user's mail storage
97 ^Current\-Folder:~^To find the default current folder
98 .fi
99
100 .SH "SEE ALSO"
101 folder(1)
102
103 .SH DEFAULTS
104 .nf
105 .RB ` +folder "' defaults to the current folder"
106 .RB ` msgs"' defaults to all"
107 .RB ` \-datefield "' defaults to date"
108 .RB ` \-notextfield '
109 .RB ` \-noverbose '
110 .RB ` \-nolimit '
111 .fi
112
113 .SH CONTEXT
114 If a folder is given, it will become the current folder.  If the current
115 message is moved,
116 .B sortm
117  will preserve its status as current.
118
119 .SH HISTORY
120 Timezones used to be ignored when comparing dates: they aren't any more.
121 .PP
122 Messages which were in the folder, but not specified by `msgs', used to
123 be moved to the end of the folder; now such messages are left untouched.
124 .PP
125 .B Sortm
126 sometimes did not preserve the message numbering in a folder
127 (e.g., messages 1, 3, and 5, might have been renumbered to 1, 2, 3 after
128 sorting).  This was a bug, and has been fixed.  To compress the message
129 numbering in a folder, use
130 .RB ` "folder\ \-pack" '
131 as always.
132
133 .SH BUGS
134 If
135 .B sortm
136 encounters a message without a date\-field, or if the
137 message has a date\-field that
138 .B sortm
139 cannot parse, then
140 .B sortm
141 attempts to keep the message in the same relative position.  This does
142 not always work.  For instance, if the first message encountered lacks
143 a date which can be parsed, then it will usually be placed at the end
144 of the messages being sorted.
145 .PP
146 When
147 .B sortm
148 complains about a message which it can't temporally
149 order, it complains about the message number
150 .B prior
151 to sorting.
152 It should indicate what the message number will be
153 .B after
154 sorting.