From mboxrd@z Thu Jan 1 00:00:00 1970 From: Achim Gratz Subject: Re: bug in expansion of variables in babel Perl Date: Sun, 24 Feb 2013 18:15:38 +0100 Message-ID: <878v6dhbut.fsf@Rainer.invalid> References: <87ppzq138q.fsf@mn.cs.uvic.ca> <87txp1zz1f.fsf@Rainer.invalid> <87a9qtk62c.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:56079) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9fBA-0006az-7t for emacs-orgmode@gnu.org; Sun, 24 Feb 2013 12:16:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U9fB8-0005Y9-Ss for emacs-orgmode@gnu.org; Sun, 24 Feb 2013 12:16:00 -0500 Received: from plane.gmane.org ([80.91.229.3]:35009) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9fB8-0005Xu-Mk for emacs-orgmode@gnu.org; Sun, 24 Feb 2013 12:15:58 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1U9fBQ-00049e-3S for emacs-orgmode@gnu.org; Sun, 24 Feb 2013 18:16:16 +0100 Received: from pd9eb5db8.dip.t-dialin.net ([217.235.93.184]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 24 Feb 2013 18:16:16 +0100 Received: from Stromeko by pd9eb5db8.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 24 Feb 2013 18:16:16 +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 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