emacs-orgmode
[Top][All Lists]
Advanced

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

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


From: Achim Gratz
Subject: Re: [O] [PATCH] bug in expansion of variables in babel Perl
Date: Sat, 02 Mar 2013 23:01:52 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.93 (gnu/linux)

Achim Gratz writes:
> Here are two patches that fix this and implement (partly) some of your
> suggestions.  I don't think Org should pollute the global Perl namespace
> by default, so I've left the definition of org-babel-perl-preface to the
> user for now.  The second patch has the debugging aid you've been
> requesting, if you bind the symbol org-babel--debug-input to anything
> the temporary input files won't be deleted after the code has run.

I've pushed these changes with some extended babel support for Perl: the
results are now interpreted by babel, like for most other languages.
Also, the wrapper has been extended to be a bit smarter: if the return
value is an arrayref (or arrayref of arrayrefs), the wrapper
automatically formats the output so that it will be interpreted as a
table (a simple arrayref will be interpreted as a column vector).  In
particular that means you can pass a table through a Perl source block
with exactly no code to write (as the variable that is input will be
returned directly).  In all other cases the return value is simply
printed, so it should be a scalar.  I've kept the wrapper as an
(anonymous) subroutine, so if anybody had latched onto "return $rv;" it
will continue to work.  Also a few tests were added.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptations for Waldorf Q V3.00R3 and Q+ V3.54R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada




reply via email to

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