emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] Re: insert .org file into other .org file by link


From: Austin Frank
Subject: [Orgmode] Re: insert .org file into other .org file by link
Date: Wed, 28 Jul 2010 14:50:33 -0400
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (darwin)

On Wed, Jul 28 2010, Rainer M Krug wrote:

> I have a .org file (lets call it basic.org), which creates me a report
> from a simulation (of a variable x, saved from R) - it works fine for
> export to html and pdf.
>
> Now I want to create a report (all.org), which should include the report
> from basic.org 10 times, but basic.report should be created from
> different simulations (X1, X2, X3, ..., X10).
>
> How can I acieve this, without having to copy - paste the .org file in
> 10 times? I would like to have a kind of dynamic lining, so that I can
>
> a) specify the name of the variable to be analysed
> b) the all.org is using basic.org to create the "all" report, so that
> when I change basic.org, the report based on all.org is also changed.

To start, you probably want to use the #+SETUPFILE and #+INCLUDE
directives [fn:1] [fn:2].  An untested Babel-based dynamic solution
might look something like

--8<---------------cut here---------------start------------->8---
#+BEGIN_SRC perl :results value org :var $n=10 $file=basic.org
# I've never actually used per with babel,
# so don't know how the :var headers work exactly
for (my $i = 0; $i < $n; $i++) {
  print "#+INCLUDE:  $file\n";
}
#+END_SRC
--8<---------------cut here---------------end--------------->8---

Hope that helps!  Let me know what you come up with.

/au

Footnotes:

[fn:1] [[info:org:Export%20options][Export options]]

[fn:2] [[info:org:Include%20files][Include files]]

-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc

Attachment: pgp4B7sevIfzI.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]