10.1 Filtering Items

Todo mode provides three ways to filter items: a general filter for items matching a user-entered regular expression, as with the search command; and two specific filters, one for diary-displayable items (i.e., those lacking todo-nondiary-marker) and one for top priority items (more on the latter below). The commands for each filter come in pairs, one for filtering just the current todo file and one for filtering a user-specified list of todo files. Thus, there are six item filtering commands:9

There are two ways to specify which files the multifile filtering commands apply to. If there are files you want to filter every time you use these commands, customize the option todo-filter-files. If you leave this option empty (the default), invoking a multifile filtering command pops up a buffer similar to the Customization buffer for todo-filter-files, in which you can select files to filter just for this invocation.

Diary and top priority items are by definition non-done todo items, but when filtering by regular expression, you can extend the scope of the command to done items by enabling the option todo-filter-done-items. Then F x x and F x m will gather both matching todo and matching done items (including done items from any archive files corresponding to the selected todo files) into the virtual category of filtered items.

There are several ways to specify how many items in each category count as top priorities and hence get filtered by F t t and F t m:


Footnotes

(9)

The use of F in the key sequences of these commands naturally recalls “filter”, but is also consistent with the Todo mode mnemonic key binding convention, since the commands involve one or more whole files.