From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: [babel] Cannot use R and sh Date: Thu, 20 Oct 2011 14:49:00 -0400 Message-ID: <28702.1319136540@alphaville.dokosmarshall.org> References: <4EA068E4.8060503@uni-koeln.de> Reply-To: nicholas.dokos@hp.com Return-path: Received: from eggs.gnu.org ([140.186.70.92]:57550) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGxfv-00067C-2i for emacs-orgmode@gnu.org; Thu, 20 Oct 2011 14:49:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RGxfs-00020M-NU for emacs-orgmode@gnu.org; Thu, 20 Oct 2011 14:49:06 -0400 Received: from g1t0027.austin.hp.com ([15.216.28.34]:33984) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGxfs-0001ze-Au for emacs-orgmode@gnu.org; Thu, 20 Oct 2011 14:49:04 -0400 In-Reply-To: Message from Bernd Weiss of "Thu, 20 Oct 2011 14:31:00 EDT." <4EA068E4.8060503@uni-koeln.de> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bernd Weiss Cc: nicholas.dokos@hp.com, emacs-orgmode@gnu.org Bernd Weiss 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