Is it possible to hide org-mode nodes with set priorities below a threshold?

My use case is: I have a bunch of large org-mode files with lots of nodes in each of them, complex nested hierarchies and I would like to (temporarily) hide lower priorities nodes to make the rest more noticeable.

For example, a criterion like "priority below #C or [#5]"

1 Answer 1


With some caveats, you can use org-match-sparse-tree for such searches:


will create a sparse tree (see Sparse Trees in the manual) of headlines with priority A or B, thereby hiding headlines with priority C.

The big caveat is the sense of the inequality: the matching expression compares strings (it doesn't know how to interpret them as priorities), so "A" and "B" are less than "C" as strings, even though they are greater as priorities.

The second caveat is the interpretation of the sparse tree, but that is just a matter of practice and squinting hard in order to convince yourself that it's doing the right thing.

The third is that I am using the standard values of priorities with no customizations. If you are customizing them, you will need to tweak the expression accordingly.

The relevant references to the manual (in addition to the Sparse Trees reference above) are Tag searches, which is really about searching using tags and properties; and Matching tags and properties which describes the syntax of the matching expressions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.