Lua primitives: index_limit()
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, but you may use index_limit() to change this.
There are four options for limiting:
Show all messages.
Show all messages which are unread.
Show all messages which have a value matching the regular expression "VAL" in the header with name NAME.
Format the message as per index_format and show all messages which match the pattern "str".
-- -- When in index-mode show all messages. -- function all_msg() index_limit( "all" ); clear(); end -- -- When in index-mode show all unread messages only. -- function new_msg() index_limit( "new" ); clear(); end -- -- Toggle display of folders -- keymap['index']['a'] = 'all_msg()' keymap['index']['n'] = 'new_msg()'
As an example of the header-limiting you might wish to see all messages received in June:
-- Jun is used to cover the abbreviated form of the date. index_limit( "HEADER:Date:Jun" );
You can limit on more than one header by using the |:
-- Limit to mails to/from me: index_limit( "HEADER:To|From:firstname.lastname@example.org" );
This function has been available since version 0.07.