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"')

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.

1 Answer 1


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 and acknowledge you have read our privacy policy.

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