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

2013-02-25 Thread D M German
Achim Eric Schulte writes: Are you familiar with `org-babel-expand-src-block' bound to C-c C-v v? Achim I wasn't, obviously, and neither was the OP. If I understand the desire correctly, it should be what you're after. Perhaps an option to raise the expanded source code buffer along

[O] bug in expansion of variables in babel Perl

2013-02-24 Thread D M German
Hi Everybody, I found a bug in the Babel perl code. When a table is used as input, the values of the table are not escaped. In fact, they are surrounded by double quotes instead of single ones '. This means that special characters are interpreted: $string, and @variable are considered

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

2013-02-24 Thread dmg
Mm, I also noticed that when :results output is used, there is no way to insert perl code before or after the executed code. org-babel-perl-wrapper-method only works for all the methods but output. It would be nice to have a variable that does this for any output type. --dmg On Sun, Feb 24, 2013

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

2013-02-24 Thread D M German
dmg Mm, I also noticed that when :results output is used, there is no way dmg to insert perl code before or after the executed code. dmg org-babel-perl-wrapper-method only works for all the methods but dmg output. It would be nice to have a variable that dmg does this for any output type.

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

2013-02-24 Thread Achim Gratz
D M German writes: I see two ways to solve this. The first is simply to replace the output format of the variable from %S to '%s' (use quotes '). I think that's the right thing to do. There shouldn't be anything in the table that needs to be interpolated by Perl while the variable is defined.

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

2013-02-24 Thread Achim Gratz
D M German writes: […] Please leave the formats alone, if you change the number of parameters there folks that use their own definitions won't know what hit them. What you want is to prepend something to the body that Babel gives you, so let-bind that result and use it. You could even advise the

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

2013-02-24 Thread Eric Schulte
Achim Gratz strom...@nexgo.de writes: D M German writes: I see two ways to solve this. The first is simply to replace the output format of the variable from %S to '%s' (use quotes '). I think that's the right thing to do. There shouldn't be anything in the table that needs to be

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

2013-02-24 Thread Achim Gratz
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

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

2013-02-24 Thread Achim Gratz
Eric Schulte writes: Are you familiar with `org-babel-expand-src-block' bound to C-c C-v v? I wasn't, obviously, and neither was the OP. If I understand the desire correctly, it should be what you're after. Perhaps an option to raise the expanded source code buffer along with the error

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

2013-02-24 Thread D M German
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