From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Cook, Malcolm" Subject: Re: HowTo? have R :sessions in org mode invoke a specific R Date: Fri, 16 Oct 2015 19:44:57 +0000 Message-ID: References: <87r4a49mcd.fsf@alphaville.bos.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56684) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZnAw6-0000CM-Qc for emacs-orgmode@gnu.org; Fri, 16 Oct 2015 15:45:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZnAw1-0000YX-Rj for emacs-orgmode@gnu.org; Fri, 16 Oct 2015 15:45:06 -0400 Received: from smtp02.stowers.org ([40.141.174.62]:38838) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZnAw1-0000YL-Kp for emacs-orgmode@gnu.org; Fri, 16 Oct 2015 15:45:01 -0400 In-Reply-To: <87r4a49mcd.fsf@alphaville.bos.redhat.com> Content-Language: en-US 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: 'Nick Dokos' , "emacs-orgmode@gnu.org" Replying on an old thread: > >>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 lo= cal > 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! >=20 > I think you got it backwards: if you are trying to use org-babel to eval= uate an R > code block, then the variable you should set is org-babel-R-command as J= ohn > indicated. Setting inferior-R-program-name to something does not tell > anything to org-babel. To use your term, org-babel does not respect infe= rior- > 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 hav= e > you tried >=20 > (setq-local org-babel-R-command "R-3.0.1 --slave --no-save") Yes! Indeed! And, Thanks! =20 And... I don't even need to remember to eval the setq statement if I includ= e in my org the following works everytime # Local Variables: # org-babel-R-command: "R-3.0.1 --slave --no-save" # End: Or put it as first line in the file: # -*- org-babel-R-command: "R-3.0.1 --slave --no-save"-*- Cheers, Malcolm >=20 > in your org-mode buffer where you are evaluating your R code? > The options are guesses based on the current setting. Untested since I k= now > virtually nothing about R. >=20 > Nick >=20