From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer M Krug Subject: Re: [babel][PATCHES] ob-R patches for review Date: Mon, 12 May 2014 10:33:48 +0200 Message-ID: References: <87ppjpm5n5.fsf@gmail.com> <8F4A9158-D8BD-4FE7-8D9A-A22C4871BDB6@gmail.com> <87ppjnt88e.fsf@bzg.ath.cx> <874n0zhvgi.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48939) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WjlgV-0008Ql-MT for emacs-orgmode@gnu.org; Mon, 12 May 2014 04:34:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WjlgO-0007lg-6w for emacs-orgmode@gnu.org; Mon, 12 May 2014 04:34:07 -0400 In-Reply-To: <874n0zhvgi.fsf@gmail.com> (Eric Schulte's message of "Fri, 09 May 2014 08:34:37 -0600") 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: Eric Schulte Cc: Bastien , "emacs-orgmode@gnu.org" , "Charles C. Berry" --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Eric Schulte writes: > Rainer M Krug writes: > >> Bastien writes: >> >>> Hi Rainer, >>> >>> Rainer M Krug writes: >>> >>>> I'll look at it again tomorrow and let you know as I made some changes >>>> since then. Do you prefer one patch to several? >>> >>> Up to Eric's taste -- but in general I think a series of patches >>> is better, it allows you to isolate and fix conflicts more easily. >> > > I agree, multiple patches make future maintenance easier. > OK - I'll do so. A little bit off-topic, is there a "git way" of splitting one patch into several patches, if it was a single commit? >>> I missed some previous discussion in this thread. Are these patches >>> ready to be applied as is? >>> >> >> >> IMO, the patches hard coded behaviors that would better be customizable >> and optional.=20 >> >> Rainer and I had some back and forth about this -- see the thread. > > With respect to these points, I'm inclined to agree with Charles in the > following. OK - see further comments below. > >> 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=3Dvalue' >> 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. > > Would such a customization variable be difficult to add to your patches? I don't think so - I'll look into it. > If not would you mind submitting a version of the patches split into > multiple commits with as much of the hard-coded R code as feasible > placed into customizable variables along the lines of the > `org-babel-R-assign-elisp-function' variable suggested by Charles.=20=20 I am thinking of actually not providing the R code in org-variables, but to put them into R files and to source them. By doing this, the customization could be done in R, which will be much easier for R users then to customize emacs variables. These would be sourced and stored into an environment "org:functions", using the same approach as ESS is using to store functions into an environment "ESSR". I would then put the variables transfered into "org:variables". These environments would only exist in the search path, and not overwrite any user set objects in R. As it needs to be sourced for each R process once, the right place would be in org-babel-R-initiate-session - correct? What would be the best place to put these R files?=20 > One lesson I've certainly learned from the Org-mode mailing list is > that you can't anticipate all of the ways that your code will be used, > so up-front customizability generally pays off. OK - point taken - and I am definitely one of those users who thinks about unusual usages of certain features. Cheers, Rainer > > Thanks, > Eric > >> >> Thanks >> >> Rainer =2D-=20 Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology,= UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax : +33 - (0)9 58 10 27 44 Fax (D): +49 - (0)3 21 21 25 22 44 email: Rainer@krugs.de Skype: RMkrug PGP: 0x0F52F982 --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) iQEcBAEBAgAGBQJTcIdwAAoJENvXNx4PUvmCqlcIAOjJVv60YqTBxIpYAIGl1hJA 2cVfhs6dquuC9gdZTotGzq9ki85WxDs+f8EJNh8nd77e0BRfrXZxeubEwO16XrC/ arvj39zDcWREm9mxZpsUw72YE+lp1yp1bNvu1Tk0TSmpSwe+NZHeQq32sVet0gM5 Wy4gPXOLEhh1AjOAH0Pex2pF76rUH0QLlKau5zHCSZJtivDMWnAv2tTVwdc7iNMO OEIm260W4wKNKt8M1Y3UwuyxIM7GnT5fut6WQONwForeYDIqo3p9tiM5X9hw46BK iceu0P4wXmwNWtJjNpleM/7SQ615VPQ65hzSRsXHsPhhDAwU57QPMkbMg8lBa2o= =sKMA -----END PGP SIGNATURE----- --=-=-=--