3

I search Org files with C-s or isearch-forward. However, when the match is hidden inside a code block in a child several levels deep, and everything is collapsed, it takes a lot of extra keystrokes to see the match. Can isearch-forward or Org be configured to expand sections where matches are found?

  • Related: The OP in this question is trying to tackle the same problem: searching the invisible text in org-mode files. – Kaushal Modi Mar 30 '15 at 21:14
  • Doesn't it already reveal the match by default? – abo-abo Mar 30 '15 at 21:19
  • @abo-abo I thought it used to but does not. I'm using latest Org from git head. Perhaps a recent change? – mankoff Mar 30 '15 at 21:24
  • My version is release_8.3beta-929-g6f66c5, but this feature was working for years. – abo-abo Mar 30 '15 at 21:35
  • 1
    The relevant option is search-invisible, though it'll only work with Isearch if the text is invisible my means of an overlay (not text properties). – politza Mar 30 '15 at 23:09
2

You can use C-c /, (org-sparse-tree) to generate a sparse tree, expanding the tree to display the matches.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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