From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: [babel][PATCHES] ob-R patches for review Date: Fri, 06 Jun 2014 12:11:24 -0400 Message-ID: <87oay6ezb2.fsf@gmail.com> References: <87ppjpm5n5.fsf@gmail.com> <8F4A9158-D8BD-4FE7-8D9A-A22C4871BDB6@gmail.com> <87ppjnt88e.fsf@bzg.ath.cx> <874n0zhvgi.fsf@gmail.com> <87y4y7uifu.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38740) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WsxiW-0007c7-PL for emacs-orgmode@gnu.org; Fri, 06 Jun 2014 13:14:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WsxiQ-00029p-JT for emacs-orgmode@gnu.org; Fri, 06 Jun 2014 13:14:12 -0400 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: Rainer M Krug Cc: Bastien , "emacs-orgmode@gnu.org" , "Charles C. Berry" >> Additionally, if the variables simply hold R code text, then users can >> easily initialize them from R files locally with something like the >> following. >> >> (setq org-babel-R-assign-elisp-function >> (with-temp-buffer >> (insert-file-contents-literally "personal.R") >> (buffer-string))) >> >> I think this approach is much simpler. > > True - but I like the simplicity of being able to customize the > behavior of org-babel-R by writing an R function without having to thin > about elisp. But maybe there is a way of doing both... > I guess one man's simplicity is another confusing magic. I don't see the difficulty in having to change the value of an elisp variable, to change the R code executed by an Emacs process, in fact I think this is the most straight forward and expected way to do such customization. > New behavior (environment): > 1) Define the R code in emacs variables, i.e. customizable in emacs. > 2) Define a function to load the code into an R environment - not customizable. The above sounds good to me. It might be nice to also include a customizable variable which controls whether the function in (2) is run at all. Best, -- Eric Schulte https://cs.unm.edu/~eschulte PGP: 0x614CA05D (see https://u.fsf.org/yw)