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: D M German
Subject: Re: [O] [PATCH] bug in expansion of variables in babel Perl
Date: Mon, 25 Feb 2013 13:54:37 -0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux)


 Achim> D M German <dmg <at> uvic.ca> writes:
 >> I think the issue is that, at least in my computer the variable $\
 >> returns empty (the record separator).

 Achim> Thinko on my side, what I wanted was the input record separator "$/"
 Achim> (to avoid
 Achim> specifying a literal newline for those systems where this is actually
 Achim> multi-character).

Hi Achim,

Once I changed it:

(defvar org-babel-perl-wrapper-method
  "{
  my @r = eval( q(
%s
              ));
  open my $BO, qq(>%s) or die qq( Perl: Could not open output file.$\\ );
  print $BO join($/, @r), $/ ;
}")

the result now has \n in between fields (literally):

#+name: t_output_table
#+begin_src perl :results table
print "Test\n";
(1, 2)
#+end_src

#+RESULTS: t_output_table
| 1\n2\n |

what is the expected field separator for Org-babel?

 Achim> Regards,
 Achim> Achim.




--
Daniel M. German                  "Prose is intrinsically linear; 
                                   a good book carries the reader forward
   The Economist ->                on the crest of the words"
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]