Next: , Previous: Special properties, Up: Properties and Columns


7.3 Property searches

To create sparse trees and special lists with selection based on properties, the same commands are used as for tag searches (see Tag searches), and the same logic applies. For example, here is a search string:

     +work-boss+PRIORITY="A"+Coffee="unlimited"+Effort<2         \
              +With={Sarah\|Denny}+SCHEDULED>="<2008-10-11>"

The type of comparison will depend on how the comparison value is written:

So the search string in the example finds entries tagged ‘:work:’ but not ‘:boss:’, which also have a priority value ‘A’, a ‘:Coffee:’ property with the value ‘unlimited’, an ‘Effort’ property that is numerically smaller than 2, a ‘:With:’ property that is matched by the regular expression ‘Sarah\|Denny’, and that are scheduled on or after October 11, 2008.

You can configure Org mode to use property inheritance during a search, but beware that this can slow down searches considerably. See Property inheritance for details.

There is also a special command for creating sparse trees based on a single property:

C-c / p
Create a sparse tree based on the value of a property. This first prompts for the name of a property, and then for a value. A sparse tree is created with all entries that define this property with the given value. If you enclose the value into curly braces, it is interpreted as a regular expression and matched against the property values.