From: "Cook, Malcolm" <MEC@stowers.org>
To: 'Nick Dokos' <ndokos@gmail.com>,
"emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: HowTo? have R :sessions in org mode invoke a specific R
Date: Fri, 16 Oct 2015 19:44:57 +0000 [thread overview]
Message-ID: <e4c5f559a16742a5b663c6c6323009db@exchsrv2.sgc.loc> (raw)
In-Reply-To: <87r4a49mcd.fsf@alphaville.bos.redhat.com>
Replying on an old thread:
> >>On Mon, Nov 4, 2013 at 11:22 AM, Cook, Malcolm <MEC@stowers.org>
> 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")
Yes! Indeed! And, Thanks!
And... I don't even need to remember to eval the setq statement if I include 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
>
> 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
>
prev parent reply other threads:[~2015-10-16 19:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-04 17:22 HowTo? have R :sessions in org mode invoke a specific R Cook, Malcolm
2013-11-04 18:02 ` John Hendy
2013-11-25 21:16 ` Cook, Malcolm
2013-11-25 21:56 ` Nick Dokos
2015-10-16 19:44 ` Cook, Malcolm [this message]
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=e4c5f559a16742a5b663c6c6323009db@exchsrv2.sgc.loc \
--to=mec@stowers.org \
--cc=emacs-orgmode@gnu.org \
--cc=ndokos@gmail.com \
/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).