* insert .org file into other .org file by link
@ 2010-07-28 8:55 Rainer M Krug
2010-07-28 18:50 ` Austin Frank
0 siblings, 1 reply; 3+ messages in thread
From: Rainer M Krug @ 2010-07-28 8:55 UTC (permalink / raw
To: emacs-orgmode
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi
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.
I am sure, that there is a way of achieving this,
Cheers,
Rainer
- --
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/
iEYEARECAAYFAkxP8IMACgkQoYgNqgF2egquLQCeJyQvGtng1NQmUsJitlc1ECZ/
SNcAn0gtIBJyE512zLkdn1No0i2rPDNW
=UtIZ
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: insert .org file into other .org file by link
2010-07-28 8:55 insert .org file into other .org file by link Rainer M Krug
@ 2010-07-28 18:50 ` Austin Frank
2010-07-29 7:27 ` Rainer M Krug
0 siblings, 1 reply; 3+ messages in thread
From: Austin Frank @ 2010-07-28 18:50 UTC (permalink / raw
To: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 1596 bytes --]
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 #1.2: Type: application/pgp-signature, Size: 194 bytes --]
[-- Attachment #2: Type: text/plain, Size: 201 bytes --]
_______________________________________________
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Re: insert .org file into other .org file by link
2010-07-28 18:50 ` Austin Frank
@ 2010-07-29 7:27 ` Rainer M Krug
0 siblings, 0 replies; 3+ messages in thread
From: Rainer M Krug @ 2010-07-29 7:27 UTC (permalink / raw
To: Austin Frank; +Cc: emacs-orgmode
-----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-----
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-07-29 7:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-28 8:55 insert .org file into other .org file by link Rainer M Krug
2010-07-28 18:50 ` Austin Frank
2010-07-29 7:27 ` Rainer M Krug
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.