1SORTM(1)                           [nmh-1.3]                          SORTM(1)
2
3
4

NAME

6       sortm - sort messages
7

SYNOPSIS

9       sortm [+folder] [msgs] [-datefield field] [-textfield field]
10            [-notextfield] [-limit days] [-nolimit] [-verbose | -noverbose]
11            [-version] [-help]
12

DESCRIPTION

14       Sortm sorts the specified messages in the named folder according to the
15       chronological order of the “Date:” field of each message.
16
17       The -verbose switch directs sortm to tell the user the general  actions
18       that it is taking to place the folder in sorted order.
19
20       The  -datefield  field  switch tells sortm the name of the field to use
21       when making the date comparison.  If the user has a  special  field  in
22       each message, such as “BB-Posted:” or “Delivery-Date:”, then the -date‐
23       field switch can be used to direct sortm which field to examine.
24
25       The -textfield field switch causes sortm to sort messages by the speci‐
26       fied  text  field.   If  this  field is “subject”, any leading "re:" is
27       stripped off.  In any case, all characters except letters  and  numbers
28       are  stripped  and  the  resulting  strings are sorted datefield-major,
29       textfield-minor, using a case insensitive comparison.
30
31       With -textfield field, if -limit days is specified, messages with simi‐
32       lar  textfields  that  are  dated  within  `days'  of each other appear
33       together.  Specifying -nolimit makes the limit infinity.   With  -limit
34       0, the sort is instead made textfield-major, date-minor.
35
36       For example, to order a folder by date-major, subject-minor, use:
37
38            sortm -textfield subject +folder
39
40

FILES

42       $HOME/.mh_profile          The user profile
43
44

PROFILE COMPONENTS

46       Path:                To determine the user's nmh directory
47       Current-Folder:      To find the default current folder
48
49

SEE ALSO

51       folder(1)
52
53

DEFAULTS

55       `+folder' defaults to the current folder
56       `msgs"'defaultstoall"
57       `-datefield' defaults to date
58       `-notextfield'
59       `-noverbose'
60       `-nolimit'
61
62

CONTEXT

64       If  a  folder is given, it will become the current folder.  If the cur‐
65       rent message is moved, sortm
66        will preserve its status as current.
67
68

HISTORY

70       Timezones used to be ignored when  comparing  dates:  they  aren't  any
71       more.
72
73       Messages which were in the folder, but not specified by `msgs', used to
74       be moved to  the  end  of  the  folder;  now  such  messages  are  left
75       untouched.
76
77       Sortm  sometimes  did  not  preserve  the message numbering in a folder
78       (e.g., messages 1, 3, and 5, might have been  renumbered  to  1,  2,  3
79       after  sorting).   This was a bug, and has been fixed.  To compress the
80       message numbering in a folder, use “folder -pack” as always.
81
82

BUGS

84       If sortm encounters a message without a date-field, or if  the  message
85       has  a  date-field that sortm cannot parse, then sortm attempts to keep
86       the message in the same relative position.  This does not always  work.
87       For  instance,  if the first message encountered lacks a date which can
88       be parsed, then it will usually be placed at the end  of  the  messages
89       being sorted.
90
91       When  sortm  complains about a message which it can't temporally order,
92       it complains about the message number  prior  to  sorting.   It  should
93       indicate what the message number will be after sorting.
94
95
96
97MH.6.8                            1 June 2008                         SORTM(1)
Impressum