[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

16. Sorting Messages

Af provides commands for sorting some or all of the messages in a mail buffer. Each command prompts for a sort order, and then sorts the selected messages into that order.

M-x sort-buffer order RET
Sort all of the messages in the buffer into order order.
M-x sort-region order RET
Sort the messages in the region into order order.
M-x sort-tagset order RET
Sort the messages in the tagset into order order. The messages in the tagset are sorted correctly, but messages which are not in the tagset are not moved at all.

The sort orders which af understands are:

(reverse-)address
The address of the sender of the message, sorted case-independent. Any full name or routing information in the address is ignored.
(reverse-)date
The date the message was sent (or received if the date sent isn't known), from oldest to newest (newest to oldest). The variable show-dates-in-local-time indicates whether dates should be compared as they are, or converted to your local time before they are compared (the default).
(reverse-)lines
The number of lines in the message, from smallest to largest (largest to smallest).
(reverse-)mailbox
The (reverse) order of the messages in the folder when it was read. Messages which were yanked into the buffer after it was read may appear anywhere in the buffer.
(reverse-)sender
The full name of the sender of the message, sorted case-independent.
(reverse-)status
The system tags of the message (see section 13.1.1 System Tags). Messages with no system tags are sorted after those that have them.
(reverse-)subject
The subject of the message, sorted alphabetically and case-independent. The prefix 'Re: ' is handled specially in subject lines, so that replies to a message will sort immediately after (before) the original message.
(reverse-)tags
The user tags of the message (see section 13.1.2 User Tags). Messages with no user tags are sorted after those that have them.

When you sort, messages which sort identically will remain in their original order, so sorting a buffer by date and then subject will result in the messages being in date order within each subject. This is often a good approximation to the "threading" that news readers such as trn do, and is handy for reading mailing lists.

Af does not sort your folders by default when it reads them. If you have a preference for reading buffers in a certain order, then you can set the configuration variable initial-buffer-sort to the sort ordering you prefer.

If you are familiar with other mail readers it is worth noting that af, unlike most other mail readers, saves the messages back to the folders in whatever order you sort them into. This can often be convenient when managing large folders.


[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated by Malc Arnold on August, 22 2002 using texi2html