emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] bug in expansion of variables in babel Perl


From: D M German
Subject: Re: [O] bug in expansion of variables in babel Perl
Date: Sun, 24 Feb 2013 10:20:04 -0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux)



 Achim> D M German writes:
 Achim> […]

 Achim> Please leave the formats alone, if you change the number of parameters
 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 function
 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 easier
 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 output
 Achim> block.

thanks, this i a great suggestion that I didn't know about.

--dmg


 Achim> Regards,
 Achim> Achim.
 Achim> -- 
 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 .

 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]