From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Charles C. Berry" Subject: Re: [babel][PATCHES] ob-R patches for review Date: Wed, 30 Apr 2014 15:49:12 -0700 Message-ID: References: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41351) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WfdJc-0005nt-50 for emacs-orgmode@gnu.org; Wed, 30 Apr 2014 18:49:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WfdJT-0005vn-Rz for emacs-orgmode@gnu.org; Wed, 30 Apr 2014 18:49:24 -0400 Received: from iport-acv2-out.ucsd.edu ([132.239.0.174]:21602) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WfdJT-0005u0-Id for emacs-orgmode@gnu.org; Wed, 30 Apr 2014 18:49:15 -0400 In-Reply-To: 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: emacs-orgmode@gnu.org On Wed, 30 Apr 2014, Rainer M Krug wrote: > Charles Berry writes: > >> Rainer M Krug krugs.de> writes: >> >>> >>> Hi >>> >>> Attached please find seven patches for review to implement the storing >>> of org variables in their own environment and to make the org-issued R >>> code look nicer in the R session. >> >> >> Rainer, >> >> >> I have suggestions and a concern. >> >> I suggest [...] > That is effectively what I am doing as well, only that I am not using a > package but an environment and add it to the search path. > [...] OK. I did not study your patches closely enough. Sorry. > >> >> I also suggest that you introduce a customization variable to >> allow a user to turn off the functionality you have created. > > I don't think this is necessary as the behavior for the user does not > change at all, only that it becomes safer to use org variables in R (see > above). > All you have to do is add this: (defvar org-babel-R-assign-elisp-function 'org-babel-R-assign-elisp "Name or definition of function to handle `:var name=value' header args." ) and change one line in org-babel-variable-assignments:R from (org-babel-R-assign-elisp to (funcall org-babel-R-assign-elisp-function and the user can provide her own elisp assignment function. This gives users who want special behavior like creating something other than a data.frame the option of providing their own function. Best, Chuck