Hello,
Joon Ro <[email protected]> writes:
>> 2. Write a function to look up the tree from point and export the first
>> subtree with a certain property.
> I thought about implementing the second approach. I have slides for
> several talks in the same org file. Since I mostly need this
> functionality when I'm developing slides, just going up from point until
> reaching the desired heading is easy to implement.
>
> If you can implement this, that would be great as I find myself doing
> this all the time as well.
I use this ad hoc implementation:
(defun hmw/org-export (&optional level)
"Go up to a section of level `level', if there is any, and then call
`org-export-dispatch'. `level' defaults to 1."
(interactive)
(unless level (setq level 1))
(save-excursion
(while (< level (or (org-up-heading-safe) -1)))
(if (org-at-heading-p)
(org-export-dispatch))))
That hack could be optimised, but works for me ;).
Regards
hmw