From mboxrd@z Thu Jan 1 00:00:00 1970 From: D M German Subject: Re: bug in expansion of variables in babel Perl Date: Sun, 24 Feb 2013 10:20:04 -0800 Message-ID: <87obf9y3or.fsf@mn.cs.uvic.ca> References: <87ppzq138q.fsf@mn.cs.uvic.ca> <87mwuuyprm.fsf@mn.cs.uvic.ca> <87mwutzwo2.fsf@Rainer.invalid> Reply-To: dmg@uvic.ca Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:54206) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9gBI-0005q3-In for emacs-orgmode@gnu.org; Sun, 24 Feb 2013 13:20:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U9gBF-0000ZQ-H3 for emacs-orgmode@gnu.org; Sun, 24 Feb 2013 13:20:12 -0500 Received: from mail-pa0-f53.google.com ([209.85.220.53]:46483) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9gBF-0000Yj-4H for emacs-orgmode@gnu.org; Sun, 24 Feb 2013 13:20:09 -0500 Received: by mail-pa0-f53.google.com with SMTP id bg4so1325194pad.40 for ; Sun, 24 Feb 2013 10:20:08 -0800 (PST) In-Reply-To: <87mwutzwo2.fsf@Rainer.invalid> (Achim Gratz's message of "Sun, 24 Feb 2013 14:08:45 +0100") 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: emacs-orgmode@gnu.org Achim> D M German writes: Achim> [=E2=80=A6] Achim> Please leave the formats alone, if you change the number of paramet= ers Achim> there folks that use their own definitions won't know what hit them. Achim> What you want is to prepend something to the body that Babel gives = you, Achim> so let-bind that result and use it. You could even advise the func= tion Achim> and have it submit to your will without changing Org. Hi Achim, thanks for the recommendation. As I said before, see my previous patch as a proof-of-concept and not as something that I think should be applied. I am fully aware of the potential consequences. Achim> BTW, now that I think some more about it: debugging Perl is much ea= sier Achim> than you seem to let on: Achim> (setq org-babel-perl-command "perl -Mstrict -ne print"). Using strict is complicated by use of variables from org tables and the way that the code in R is executed. It would require the variable @r and each of the created variables from tables to be defined as my. I know I can change the behaviour of org-babel-variable-assignment, but perhaps simply adding "my" to any variable created in org would be a good thing to do. I don't think it would harm, anyways. Achim> This will echo the program sent to Perl in full glory into the outp= ut Achim> block. thanks, this i a great suggestion that I didn't know about. --dmg Achim> Regards, Achim> Achim. Achim> --=20 Achim> +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ Achim> Waldorf MIDI Implementation & additional documentation: Achim> http://Synth.Stromeko.net/Downloads.html#WaldorfDocs -- Daniel M. German "Beware of bugs in the above code; I have only proved it Donald Knuth -> correct, not tried it." http://turingmachine.org/ http://silvernegative.com/ dmg (at) uvic (dot) ca replace (at) with @ and (dot) with . =20