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.

Drew
  • 75,699
  • 9
  • 109
  • 225
godblessfq
  • 1,177
  • 8
  • 21

1 Answers1

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.

NickD
  • 27,023
  • 3
  • 23
  • 42