* Can’t include file with babel
@ 2018-02-14 16:37 Rasmus
2018-02-14 17:16 ` Nicolas Goaziou
0 siblings, 1 reply; 3+ messages in thread
From: Rasmus @ 2018-02-14 16:37 UTC (permalink / raw)
To: emacs-orgmode
Hi,
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.
Should it be possible to include stuff like this using Babel or is it too
circular?
Thanks,
Rasmus
--
. . . It begins of course with The Internet. A Net of Peers
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Can’t include file with babel
2018-02-14 16:37 Can’t include file with babel Rasmus
@ 2018-02-14 17:16 ` Nicolas Goaziou
2018-02-15 8:07 ` Rasmus
0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Goaziou @ 2018-02-14 17:16 UTC (permalink / raw)
To: Rasmus; +Cc: emacs-orgmode
Hello,
Rasmus <rasmus@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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Can’t include file with babel
2018-02-14 17:16 ` Nicolas Goaziou
@ 2018-02-15 8:07 ` Rasmus
0 siblings, 0 replies; 3+ messages in thread
From: Rasmus @ 2018-02-15 8:07 UTC (permalink / raw)
To: emacs-orgmode
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
> Hello,
>
> Rasmus <rasmus@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'.
That is what I suspected, and I’d probably agree. It’s no issue, really.
(I also considered rearranging headings based on tags with a tree filter,
but that is even more convoluted than the above approach).
Thanks,
Rasmus
--
Sådan en god dansk lagereddike kan man slet ikke bruge mere
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-02-15 8:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-14 16:37 Can’t include file with babel Rasmus
2018-02-14 17:16 ` Nicolas Goaziou
2018-02-15 8:07 ` Rasmus
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.