[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [babel] Using :prologue and :epilogue with unbalanced brackets
From: |
Rainer M Krug |
Subject: |
Re: [O] [babel] Using :prologue and :epilogue with unbalanced brackets |
Date: |
Tue, 21 Jan 2014 11:28:13 +0100 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 01/20/14, 16:34 , Eric Schulte wrote:
> Rainer M Krug <address@hidden> writes:
>
>> Hi
>>
>> I would like to use :prologue and :epilogue to enclose the code block
>> in a local({}) block, i.e.
>>
>> * test
>> #+begin_src R :prologue local({ :epilogue })
>> qwerty <- "test"
>> #+end_src
>>
>
> I tried wrapping the prologue and epilogue values in quotes so that they
> would be interpreted as strings, and I no longer see the problem you
> describe and it works in a session, but I get a different R issues
> outside of a session.
Agreed -
* test
#+begin_src R :results output :prologue "local({" :epilogue "})" :session
cat("Test")
#+end_src
#+RESULTS:
no :session nothing happens
using :session the execution does not complete because the :epilogue is not
appended.
* test 2
#+begin_src R :results output :prologue "cat(1, '###\n')" :epilogue "cat(2,
'###\n')" :session
cat("Test\n")
#+end_src
#+RESULTS:
: 1 ###
: Test
works under :session and without
but
* test 2
#+begin_src R :results output :prologue "{cat(1, 2 )" :epilogue "cat(2, 3)}"
:session
cat("Test\n")
#+end_src
works only without :session as R is waiting for the "}" which is in the
:epilogue but which is not added.
Cheers,
Rainer
>
> Best,
>
>>
>> But the problem seems to be the unbalanced brackets, and everything is
>> passed on as the prologue, as I get the error:
>>
>> Error: unexpected ':' in:
>> "{
>> local({ :"
>> Execution halted
>>
>> Can I somehow use unbalanced brackets, or is this a missing option in
>> epilogue and prologue?
>>
>> Cheers,
>>
>> Rainer
>>
>>
>> --
>> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
>> Biology, UCT), Dipl. Phys. (Germany)
>>
>> Centre of Excellence for Invasion Biology
>> Stellenbosch University
>> South Africa
>>
>> Tel : +33 - (0)9 53 10 27 44
>> Cell: +33 - (0)6 85 62 59 98
>> Fax : +33 - (0)9 58 10 27 44
>>
>> Fax (D): +49 - (0)3 21 21 25 22 44
>>
>> email: address@hidden
>>
>> Skype: RMkrug
>
- --
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology,
UCT), Dipl. Phys. (Germany)
Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa
Tel : +33 - (0)9 53 10 27 44
Cell: +33 - (0)6 85 62 59 98
Fax : +33 - (0)9 58 10 27 44
Fax (D): +49 - (0)3 21 21 25 22 44
email: address@hidden
Skype: RMkrug
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.22 (Darwin)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQEcBAEBAgAGBQJS3ku9AAoJENvXNx4PUvmC7ngH/ieVPjonhs5J9fKNJADzf3yo
XjkJ22prTY13ZggXBmp85suZzCuMJDP8FtpI2jBOfjAJvwIHiYL7g+rmHBFvXyV5
3tErw4qwQ9xsrwOdAor9tnnFe7WnzZCBGx/Dp8FyWKu28qvqQDzm+QHvWbXtOS1J
tlq3QY9mPeK/T1xxWCDUwUMwe+Sfmta3eQSWcn+zvfwrhBAp8Fo5ifzcTMWqe9XW
OIkRjEDiYBY85GkuEN2nlmWrM67OZuq/XVVif5nclASufiA/3Z5XKeW5R01BMwPr
EFlYy3WcgJcIPMsJjpMlIl6pjKGi2wnzsSoS8tWTyL5uPqgTgCsMnmg3QAUS/n4=
=JHaw
-----END PGP SIGNATURE-----