1

For example, the master file is named test.org with the following content:

#+title: test

* test
#+BEGIN_SRC python :exports results :results output raw
#! /usr/bin/env python     
# -*- coding: utf-8 -*-   
print('#+include: "hello.org"')
#+END_SRC

hello.org is in the current folder with the following content:

* hello world

run org-export-to-odt in the buffer of test.org doesn't include hello.org.

2

During export, include keywords are parsed before babel evaluation of source blocks. By the time the block is evaluated and the include line is produced, it's too late to process it.

You might do an export to org instead with C-c O o, producing a test.org.org file that contains the include. Then export that file to ODT.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.