Lumail - The console email client

Lua primitives: sort()

NOTE: Lumail-legacy has been superseded by Lumail 2.x, which has a wholly unified Lua API.

When the global_mode is set to index you will be presented with a list of messages.

The list will default to showing all available messages, in the order "oldest" to "most recent". The sort-primitive allows you to change that order.

Valid options are:

date-ascOldest to most recent. The default.
date-descMost recent to oldest.
from-ascBy sender, ascending.
from-descBy sender, descending.
header-ascBy the value of the Date: header, ascending.
header-descBy the value of the Date: header, descending.
subject-ascBy subject, ascending.
subject-descBy subject, descending.

For example:

-- Show in order received.
sort( "date-asc" );

NOTE: The date-* options sort the messages based upon the mtime attribute of the message-files, as returned by stat which might be inaccurate. Please see the technical FAQ for notes on this.


This function has been available since version 0.15.

See Also

See also index_limit.