TODO External shell issues
- State "TODO" from ""
TODO org-babel-sh explicitly specify the shell
this should be possible as source-code execution shouldn't depend on the values of user-specific information (i.e. the user's shell)
DEFERRED Improve external shell issues under Windows (with R at least)
- State "DEFERRED" from "PROPOSED"
- State "PROPOSED" from ""
I'm wondering whether we should implement some windows-specific hackery to make it less likely that users will have problems with R under windows.
If someone wants to submit a Windows specific patch I'd be happy to apply it, I however have no access to a Windows machine [Eric].
Two users have now mailed the list reporting that they can't get org-babel to work with R under Windows. The problem stems from the fact that we use the external shell execution as default, but under Windows it is quite often the case that users have not set their system up so that "R" is in the shell path. One possibility would be to make session (ESS) the R Windows default when available. Another approach is suggested by this email by d.tchin:
d.tchin R Windows shell email
From: "d.tchin" <d.tchin@voila.fr>
Subject: [Orgmode] Re: org-babel-R and windows ?
User-Agent: Loom/3.14 (http://gmane.org/)
Date: Wed, 13 Jan 2010 09:20:11 +0000 (UTC)
To: emacs-orgmode@gnu.org
Dan Davison <davison <at> stats.ox.ac.uk> writes:
> The org-babel default is to invoke R as an external shell command, and I
> think this is what is causing the problem. It requires that the emacs
> function shell-command can use the string "R" to invoke an R process,
> i.e. the R installation and the shell path must be such that this is the
> case.
Thank you for the information and explanation.
It seems that the problem comes from the windows shell.
I try the following : I explicitely told emacs to use bash
with the following instructions :
(setq explicit-shell-file-name "C:/msys/1.0/bin/bash.exe")
(setq shell-file-name explicit-shell-file-name)
It works with bash.
>
> #+srcname:trial
> #+beginsrc R :session org-babel-R-session
> c(4,5,6,7,8,9)
> #+endsrc\\
The "session" way works too.
Thank you.