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: Achim Gratz
Subject: Re: [O] bug in expansion of variables in babel Perl
Date: Sun, 24 Feb 2013 18:15:38 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.93 (gnu/linux)

Eric Schulte writes:
> I just added the variable `org-babel-perl-var-wrap', into ob-perl.el
>
>     ;; emacs-lisp
>     (defvar org-babel-perl-var-wrap "q(%s)"
>       "Wrapper for variables inserted into Perl code.")
>
> This way we will get what sounds like improved wrapping by default, but
> users who really do want to insert interpolated values can customize
> this variable.

It would be impossible to use any user variables for interpolation since
we don't have Perl sessions, so only pre-defined variables from Perl
would ever deliver a value (perhaps).  So all interpolation would do
most of the the time is to replace something that happens to look like a
perl variable by nothing.  Having the variable doesn't hurt, but I'm not
sure we should advertize its existence widely since with a more devious
definition you can do arbitrary code execution.

> This complexity is related to the need to occasionally run in remote
> directories or on remote machines.  If there are ways to reduce this
> complexity without losing functionality I'm game.

Already done by throwing away those parts of the code we never used
anyway.  It looks much more manageable now.

> I'm not currently aware of any language-wide support for printing the
> expanded code block along with the results.  I don't think there has
> been any desire for this previously.  It shouldn't be hard to write an
> emacs lisp block to give the desired result...

Also done.  The file the OP wanted to look at gets written out anyway,
we just need to prevent its deletion.  This is a manual affair for now,
if this is really a big issue we can add an option for this.


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

SD adaptation for Waldorf rackAttack V1.04R1:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada




reply via email to

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