Hello,

Rasmus <ras...@gmx.us> writes:

> I am stitching together a number of documents to produce a report.
>
> I though I’d be clever and include subfile headings in the right order at
> the right place using babel.
>
> I do something like
>
>     * Appendix to chapter N
>
>     #+call: include-between(file="other-paper.org", first="appendix1", 
> last="appendix3") :results value raw
>
> Producing
>
>     #+RESULTS:
>
>     #+include: "other-paper.org::*appendix1" :minlevel 2
>     #+include: "other-paper.org::*appendix2" :minlevel 2
>
>     #+include: "other-paper.org::*appendix3" :minlevel 2
>
> This doesn’t work seem to work, I guess because #+include is expanded
> before anything else.

Correct.

> Should it be possible to include stuff like this using Babel or is it too
> circular?

The latter.

You can generate programmatically parts of the document with
`org-export-before-processing-hook'.

Regards,

-- 
Nicolas Goaziou

Reply via email to