I'm trying to export an org file into a file that contains only the visible entries (and parents) of a sparse tree (matching a specific tag).
For example, applying this to the following tree
* A Some content at level 0 ** A1 :matchthis: Some content at level 1 ** A2 * B Some content at level 0
matching the tag
matchthis should produce the same result as exporting the tree:
* A Some content at level 0 ** A1 :matchthis: Some content at level 1
If I export everything (in PDF, or txt), then the top level headlines (
B) are also visible and therefore always included.
I don't see a way to export an org-file to an org-file with only the matched entries, which could be an acceptable intermediate step.