From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: [BUG] ob-perl variable handling broken Date: Sun, 24 Mar 2013 18:27:18 -0600 Message-ID: <87boa8nx21.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:49062) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UJvG4-0004Jx-T0 for emacs-orgmode@gnu.org; Sun, 24 Mar 2013 20:27:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UJvG3-0008K5-Hr for emacs-orgmode@gnu.org; Sun, 24 Mar 2013 20:27:28 -0400 Received: from mail-da0-x231.google.com ([2607:f8b0:400e:c00::231]:59809) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UJvG3-0008Ju-AY for emacs-orgmode@gnu.org; Sun, 24 Mar 2013 20:27:27 -0400 Received: by mail-da0-f49.google.com with SMTP id t11so2982290daj.36 for ; Sun, 24 Mar 2013 17:27:26 -0700 (PDT) In-Reply-To: (Rick Frankel's message of "Sun, 24 Mar 2013 19:54:33 -0400") 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: Rick Frankel Cc: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Rick Frankel writes: > The commit ca125b82b changed a lot of the variable handling in > ob-perl, and it now will not accept tables as input. Below is an org > doc with an example, the error message and a backtrace. > The attached patch fixes this behavior, however I haven't committed it because I fear it would undo some of Achim's intentions in commit ca125b82b. I'll leave the final solution to Achim. Thanks for pointing this out, --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-print-Perl-variables-with-a-format-string.patch >From 0007d05de6e2d8994da01eee3ed4cec29ff43682 Mon Sep 17 00:00:00 2001 From: Eric Schulte Date: Sun, 24 Mar 2013 18:25:42 -0600 Subject: [PATCH] print Perl variables with a format string Don't use princ because it doesn't always return a string. Thanks to Rick Frankel for pointing this out. * lisp/ob-perl.el (org-babel-perl--var-to-perl): Print Perl variables with a format string. --- lisp/ob-perl.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ob-perl.el b/lisp/ob-perl.el index 8bc84f0..a9db6ef 100644 --- a/lisp/ob-perl.el +++ b/lisp/ob-perl.el @@ -87,7 +87,7 @@ specifying a var of the same value." (concat "[\n" (mapconcat #'org-babel-perl--var-to-perl var "") prefix "]")) - (concat "q(" (princ var) ")")) + (format "q(~a)" var)) (unless (zerop org-babel-perl--lvl) ",\n"))))) (defvar org-babel-perl-buffers '(:default . nil)) -- 1.8.2 --=-=-= Content-Type: text/plain -- Eric Schulte http://cs.unm.edu/~eschulte --=-=-=--