emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] [babel] Cannot use R and sh


From: Nick Dokos
Subject: Re: [O] [babel] Cannot use R and sh
Date: Thu, 20 Oct 2011 14:49:00 -0400

Bernd Weiss <address@hidden> wrote:

> Hi all,
> 
> when using R and shell commands, the shell commands are sent to the R
> buffer. I guess this has something to do with the session argument?!
> 
> ############# test.org #####################
> 
> #+property: session *R*
> 
> #+BEGIN_SRC R
> ## comment
> 1+1
> #+END_SRC
> 
> #+results:
> : 2
> 
> 
> #+BEGIN_SRC sh
> ls -a
> #+END_SRC
> 
> #+results:
> : Error: object 'a' not found
> 
> ############# test.org #####################
> 

AFAIK, the syntax is (note the BABEL and the :session)

#+BABEL: :session *R*

With that, I can certainly reproduce what you get and it
is indeed the global session that causes it. If you
want a global session for all the other code blocks but
want to override it for the single shell block, you can do:

#+BEGIN_SRC sh :session *SH*
ls -a
#+END_SRC

Nick






reply via email to

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