From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer M Krug Subject: Re: Re: insert .org file into other .org file by link Date: Thu, 29 Jul 2010 09:27:43 +0200 Message-ID: <4C512D6F.6090008@gmail.com> References: <4C4FF083.9030109@gmail.com> Reply-To: R.M.Krug@gmail.com Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=60802 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OeNWu-00037d-C4 for emacs-orgmode@gnu.org; Thu, 29 Jul 2010 03:27:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OeNWs-0001LI-Ha for emacs-orgmode@gnu.org; Thu, 29 Jul 2010 03:27:47 -0400 Received: from mail-wy0-f169.google.com ([74.125.82.169]:57514) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OeNWs-0001L8-9J for emacs-orgmode@gnu.org; Thu, 29 Jul 2010 03:27:46 -0400 Received: by wyg36 with SMTP id 36so34673wyg.0 for ; Thu, 29 Jul 2010 00:27:45 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Austin Frank Cc: emacs-orgmode@gnu.org -----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. > Emacs-orgmode@gnu.org > 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: Rainer@krugs.de 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-----