org.nvim

Sparse trees

<prefix>/ shows a menu:

/ rregexp
tTODO entries
Tspecific keyword
mmatch
Mmatch, TODO only
pproperty value
ddeadlines due or overdue
bbefore date
aafter date
Dbetween dates
ccycle date types
Cclear

The deadline tree (d, org-check-deadlines) shows the entries not done whose active DEADLINE is past due or within deadline_warning_days days (its absolute value; a stamp's own -Nd lead time is not used). A count before <prefix>/ tests that many days instead.

The date trees (b, a, D) highlight each timestamp before the date, on or after it, or from the first date up to (not including) the second, like Emacs. Which timestamps count is the date type shown in the menu's title, sparse_tree_default_date_type at first (org-sparse-tree-default-date-type); c cycles it: SCHEDULED/DEADLINE (nil), "all", "scheduled", "deadline", "active", "inactive", "closed". The planning types look at the planning line; the others at timestamps in the text, not in planning or clock lines, property drawers, blocks, comments or verbatim. Subtrees tagged :ARCHIVE: stay folded, with their headline visible, unless sparse_tree_open_archived_trees (org-sparse-tree-open-archived-trees).

<C-c>\Tags / property match sparse tree (org-match-sparse-tree). With a count, only TODO entries match.
:Org occur {regexp}Regexp sparse tree (org-occur, like / in the menu).
:Org tags_sparse_tree {match}Tags / property match sparse tree for {match}. While you type either command, the matches are highlighted live (org-command-preview); the buffer is folded when you press <CR>. Without an argument, they ask for it.

The buffer is folded so only matching entries are visible, the matches are highlighted, and the location list is filled (:lnext). The highlights go away with the next <C-c><C-c>, and those of searches (all but tag and property matches, like Emacs' org-occur) with the next change too (remove_highlights_with_change, org-remove-highlights-with-change). Regexp searches ignore case (occur_case_fold_search, org-occur-case-fold-search: true, false or "smart", only when the regexp has no upper case letter; \c / \C in the regexp win). How much shows around each match follows org-show-context-detail (occur-tree and tags-tree). After a search the User autocmd OrgOccur runs (org-occur-hook), with data.matches the number of matches.