Support basic #+INCLUDE (src/example/export block only)

including org files is more complex - e.g. footnotes need to be namespaced to
their source file. org does this by prefixing each included files footnotes
with a number - but even that is not enough as it doesn't guarantee
uniqueness.

As I don't have a usecase for it, I'll avoid the additional complexity for
now.
This commit is contained in:
Niklas Fasching 2018-12-14 16:44:28 +01:00
parent 04df30a7b5
commit 2947d7632d
13 changed files with 150 additions and 26 deletions

13
org/testdata/misc.org vendored
View file

@ -12,6 +12,19 @@ verse
or even a *totally* /custom/ kind of block
crazy ain't it?
#+END_CUSTOM
*** DONE [[https://github.com/chaseadamsio/goorgeous/issues/31][#31]]: Support #+INCLUDE
Note that only src/example/export block inclusion is supported for now.
There's quite a lot more to include (see the [[https://orgmode.org/manual/Include-files.html][org manual for include files]]) but I
don't have a use case for this yet and stuff like namespacing footnotes of included files
adds quite a bit of complexity.
for now files can be included as:
- src block
#+INCLUDE: "./headlines.org" src org
- export block
#+INCLUDE: "./paragraphs.html" export html
- example block
#+INCLUDE: "../../.travis.yml" example yaml
*** DONE [[https://github.com/chaseadamsio/goorgeous/issues/33][#33]]: Wrong output when mixing html with org-mode
#+HTML: <div class="outline-2" id="meta" style="color: green;">
| *foo* | foo |