Rasmus <ras...@gmx.us> writes: > With a filter the endpoint isn't a problem. Only identifying the > top-level can be tricky—but you could use <h·> tags, assuming they are > not varying.
You can also use a hook function that will mark first level headlines with some special string before export. Within the filter, you will recognize that string and remove it. > That a shame. Is there any other 'easy' way to recover the element > representation of, say, a headline? Often it's a lot easier to work > with than regexp "hacks". Well, the whole point of filters is to be able to work from a string instead of the full parse tree. For the latter, you can use a parse tree filter that will alter the tree in any way you like. For that task, some useful functions are `org-element-extract-element', `org-element-insert-before' and `org-element-adopt-elements'. Regards, -- Nicolas Goaziou