emacs-orgmode
[Top][All Lists]
Advanced

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

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


From: Rainer M Krug
Subject: Re: [Orgmode] Re: insert .org file into other .org file by link
Date: Thu, 29 Jul 2010 09:27:43 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.7) Gecko/20100720 Lightning/1.0b2 Thunderbird/3.1.1

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Austin,


On 28/07/10 20:50, Austin Frank wrote:
> 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

The #+INCLUDE is the one I was looking for. And when I use the same R
session for evaluation in the main org file and the included org file, I
don't need the :var - I just load the file to be reported on into a
variable name before I call #+INCLUDE, and then it should work.

Thanks,

Rainer


> 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]]
> 
> 
> 
> 
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> address@hidden
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode


- -- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Natural Sciences Building
Office Suite 2039
Stellenbosch University
Main Campus, Merriman Avenue
Stellenbosch
South Africa

Tel:        +33 - (0)9 53 10 27 44
Cell:       +27 - (0)8 39 47 90 42
Fax (SA):   +27 - (0)8 65 16 27 82
Fax (D) :   +49 - (0)3 21 21 25 22 44
Fax (FR):   +33 - (0)9 58 10 27 44
email:      address@hidden

Skype:      RMkrug
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxRLW8ACgkQoYgNqgF2egqrwwCeLel5w/BFDknDWt7Fny+d0aqs
5qwAoIOfhY3fSt6LBUut8du+89Ox1aCU
=xp6M
-----END PGP SIGNATURE-----



reply via email to

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