Sparse Trees
#-- mode: org --
The Basic Concept
An important feature of Org mode is sparse trees. These are filtered views of one's data based on a search string. You get to see what you searched for but data unrelated to your search is hidden.
Many people do not know about the feature.
There are several commands to create sparse trees available through what is called a "dispatcher"—a special command interface, activated through the invocation of
C-c / (org-sparse-tree)
The term "sparse" means that the view you see of your information is necessarily minimal.
In sparse trees, the view you see is always the result of a search or filtering action based on specific criteria.
C-c / r
OR C-c / /
give you are regexp search (org-occur)
Search for the string "concept" Search for the string "criteria"
Note: Cursor can be anywhere in buffer
Note: Any editing command or C-c C-c
removes the highlights
Note: You can keep highlights and stack them with a repeated invocation of C-u
prefix
Note: You jump to matches by invoking M-g n
and M-g p
Org Agenda
Spare Trees are especially helpful for navigating org-agenda
files.
One can add frequently used sparse tree searches to the Org Agenda dispatcher by customizing the variable org-agenda-custom-commands
.
(setq org-agenda-custom-commands '(("f" occur-tree "FIXME")))