[Orgmode] Re: org-babel-R and windows ?
Hi Dan, Dan Davison wrote: d.tchin d.tc...@voila.fr writes: 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. Thanks for that, I've stored your solution in the org-babel development repo with a view to modifying our code so that these probloems are minimised in the future, and we'll also make sure the documentation addresses this. I'm a Windows user *and* an Ubuntu user for years, now, with one single common `.emacs' file for both OS. Therefore, I'll show you what I have in my `.emacs': --8---cut here---start-8--- ;;*** [ 41.1 Single Shell ;; for single shell commands (setq shell-file-name bash) ;; must be in the `PATH' (Windows users) ;;*** [ 41.2 Interactive Shell ;; for the interactive (sub)shell (setq explicit-shell-file-name shell-file-name) --8---cut here---end---8--- Almost the same, except the order (not important) and the fact that bash is written in its simplest form: no hard-coded path, and no `.exe' suffix, so that it works for both Win32 and Linux. The only thing to do, for Windows users, is ensure that `bash.exe' (generally located in `C:\cygwin\bin') is in the Windows PATH environment variable. I would advice keeping such a construct, instead of full paths. Best regards, Seb -- Sébastien Vauban ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: org-babel-R and windows ?
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 #+begin_src R :session org-babel-R-session c(4,5,6,7,8,9) #+end_src The session way works too. Thank you. ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: org-babel-R and windows ?
d.tchin d.tc...@voila.fr writes: 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. Thanks for that, I've stored your solution in the org-babel development repo with a view to modifying our code so that these probloems are minimised in the future, and we'll also make sure the documentation addresses this. Dan #+srcname:trial #+begin_src R :session org-babel-R-session c(4,5,6,7,8,9) #+end_src The session way works too. Thank you. ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode