emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <nicholas.dokos@hp.com>
To: Bernd Weiss <bernd.weiss@uni-koeln.de>
Cc: nicholas.dokos@hp.com, emacs-orgmode@gnu.org
Subject: Re: [babel] Cannot use R and sh
Date: Thu, 20 Oct 2011 14:49:00 -0400	[thread overview]
Message-ID: <28702.1319136540@alphaville.dokosmarshall.org> (raw)
In-Reply-To: Message from Bernd Weiss <bernd.weiss@uni-koeln.de> of "Thu, 20 Oct 2011 14:31:00 EDT." <4EA068E4.8060503@uni-koeln.de>

Bernd Weiss <bernd.weiss@uni-koeln.de> 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	other threads:[~2011-10-20 18:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-20 18:31 [babel] Cannot use R and sh Bernd Weiss
2011-10-20 18:49 ` Nick Dokos [this message]
2011-10-20 18:58   ` Bernd Weiss
2011-10-20 19:10     ` [babel] Specifying buffer-wide header arguments: #+property vs #+babel (was: Cannot use R and sh) Bernd Weiss
2011-10-20 19:21       ` [babel] Specifying buffer-wide header arguments: #+property vs #+babel Eric Schulte

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=28702.1319136540@alphaville.dokosmarshall.org \
    --to=nicholas.dokos@hp.com \
    --cc=bernd.weiss@uni-koeln.de \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).