From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: HowTo? have R :sessions in org mode invoke a specific R Date: Mon, 25 Nov 2013 16:56:50 -0500 Message-ID: <87r4a49mcd.fsf@alphaville.bos.redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47438) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vl49c-00037F-2d for emacs-orgmode@gnu.org; Mon, 25 Nov 2013 16:57:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vl49V-00009y-VL for emacs-orgmode@gnu.org; Mon, 25 Nov 2013 16:57:16 -0500 Received: from plane.gmane.org ([80.91.229.3]:37799) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vl49V-00009t-P2 for emacs-orgmode@gnu.org; Mon, 25 Nov 2013 16:57:09 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Vl49S-00052K-UB for emacs-orgmode@gnu.org; Mon, 25 Nov 2013 22:57:06 +0100 Received: from nat-pool-bos-t.redhat.com ([66.187.233.206]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 25 Nov 2013 22:57:06 +0100 Received: from ndokos by nat-pool-bos-t.redhat.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 25 Nov 2013 22:57:06 +0100 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: emacs-orgmode@gnu.org "Cook, Malcolm" writes: >>On Mon, Nov 4, 2013 at 11:22 AM, Cook, Malcolm wrote: > >> I wish to lock an org buffer to a particular installation of R so that all code blocks use it. > >> > >> I found that I could not, for instance, write `:session R-3.0.1`. > >> > >> Is there some best way for me to accomplish this? > >> > >> Perhaps some way of setting inferior-R-program-name to a buffer local value? > > > >I'm no good at in-buffer variables, but this one looks of interest: > >org-babel-R-command > > Indeed, John, that is the variable I would like to have respected when I > > (setq-local inferior-R-program-name "R-3.0.1") > > > But, alas it is not. > > Any other takers? > > Thanks! I think you got it backwards: if you are trying to use org-babel to evaluate an R code block, then the variable you should set is org-babel-R-command as John indicated. Setting inferior-R-program-name to something does not tell anything to org-babel. To use your term, org-babel does not respect inferior-R-program-name; the only thing it knows is org-babel-R-command. Only ESS respects inferior-R-program-name, but you are not using ESS here. So have you tried (setq-local org-babel-R-command "R-3.0.1 --slave --no-save") in your org-mode buffer where you are evaluating your R code? The options are guesses based on the current setting. Untested since I know virtually nothing about R. Nick