This question is a derivative of Export to multiple files according to tags. I wish to export to different files, according to tags.
To achieve this goal, I wrote some lines of code :
(defun export (tagname)
"Export to a file named tagname.pdf all the headlines tagged with tagname"
(let ((org-export-select-tags (list tagname)) (async nil) (subtreep nil) (visible-only nil) (body-only nil) (ext-plist '()))
(org-export-to-file 'beamer (concat tagname ".tex") async subtreep visible-only body-only ext-plist (lambda (file) (org-latex-compile file))))
)
(export "s1")
(export "s2")
where s1
and s2
are the tags to generate files from.
This is working as expected and generates files "s1.pdf" and "s2.pdf" correctly.
However, when I change (async nil)
to (async t)
, the tag selection is not used anymore and two identical pdf files are generated, containing all headlines.
I would like to know if in async export, the variable org-export-select-tags
is used and, if not, if it is possible to reduce the async export scope.