From mboxrd@z Thu Jan 1 00:00:00 1970 From: D M German Subject: Re: [PATCH] bug in expansion of variables in babel Perl Date: Mon, 25 Feb 2013 01:42:16 -0800 Message-ID: <87a9qsvifb.fsf@mn.cs.uvic.ca> References: <87ppzq138q.fsf@mn.cs.uvic.ca> <87d2vphccc.fsf@Rainer.invalid> Reply-To: dmg@uvic.ca Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:40153) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9uZr-0007lM-Fz for emacs-orgmode@gnu.org; Mon, 25 Feb 2013 04:42:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U9uZi-0001Z6-84 for emacs-orgmode@gnu.org; Mon, 25 Feb 2013 04:42:31 -0500 Received: from mail-pb0-f41.google.com ([209.85.160.41]:39258) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9uZh-0001Yh-U1 for emacs-orgmode@gnu.org; Mon, 25 Feb 2013 04:42:22 -0500 Received: by mail-pb0-f41.google.com with SMTP id um15so1596267pbc.14 for ; Mon, 25 Feb 2013 01:42:20 -0800 (PST) In-Reply-To: <87d2vphccc.fsf@Rainer.invalid> (Achim Gratz's message of "Sun, 24 Feb 2013 18:05:07 +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 Achim Gratz twisted the bytes to say: Hi Achim, thanks for taking the time to do this. I applied the patch, one of the hunks didn't apply due to Eric's changes, but that is not an issue, since they do the same: ---------------------------------------------------------------------- diff a/lisp/ob-perl.el b/lisp/ob-perl.el (rejected hunks) @@ -75,7 +75,7 @@ (defun org-babel-perl-var-to-perl (var) specifying a var of the same value." (if (listp var) (concat "[" (mapconcat #'org-babel-perl-var-to-perl var ", ") "]") - (format "%S" var))) + (format "q(%s)" var))) (defvar org-babel-perl-buffers '(:default . nil)) ---------------------------------------------------------------------- Everything works as intended, except for the return value of the perl code. Values in the list are concatenated, as one: #+begin_src perl :results table (1, 2, 3) #+end_src #+RESULTS: | 123 | #+begin_src perl :results table (1, 2, 3) #+end_src #+RESULTS: | 123 | I think the issue is that, at least in my computer the variable $\ returns empty (the record separator). #+begin_src perl :results output print "value of \$\\ [$\]\n"; #+end_src #+RESULTS: #+begin_example value of $\ [] #+end_example --daniel -- Daniel M. German "Work. Finish. Publish. " Michael Faraday http://turingmachine.org/ http://silvernegative.com/ dmg (at) uvic (dot) ca replace (at) with @ and (dot) with .