I am trying to write on org-mode backend to generate Jupyter Notebook, specifically optimized for producing slides using RISE (see https://github.com/hkarl/org-juslides if interested).
Suppose I have a src-code block. How can I find out the tags of its enclosing headline (if any tags exist)?
The closest thing I found is this How can I get the tags for a headline in a clock report formula?, and Org-mode backend: access properties in heading - but they are after somewhat different problems.
I know how to get at attributes of the src-block itself, but I'd rather not have to repeat a "skipslide" tag already set in the headline.
I suppose it would be possible traversing org-element-lineage, but that seems like vast overkill. Is there any simpler option?
Any pointers much appreciated!
Thanks a lot,
(defun org-juslides-src-block (src-block contents info) (let ( (code (org-export-format-code-default src-block info)) (animate (org-export-read-attribute :attr_juslides src-block :animate)) ) (print "src block") (print (org-element-lineage src-block '('heading) )) (print animate) (org-juslides-cell "code" (if animate "fragment" "-") code) ) )