From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Thum Subject: Re: Org-babel: Maxima invocation fix Date: Tue, 08 May 2012 13:38:18 +0200 Message-ID: <4FA905AA.3080502@gmx.de> References: <4FA81EAD.70403@gmx.de> <87r4uvbt86.fsf@Rainer.invalid> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------010108020503060802070804" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:37027) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SRikL-00018F-6X for emacs-orgmode@gnu.org; Tue, 08 May 2012 07:38:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SRikI-0002Fw-EL for emacs-orgmode@gnu.org; Tue, 08 May 2012 07:38:24 -0400 Received: from mailout-de.gmx.net ([213.165.64.22]:46730) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1SRikI-0002EB-3V for emacs-orgmode@gnu.org; Tue, 08 May 2012 07:38:22 -0400 In-Reply-To: <87r4uvbt86.fsf@Rainer.invalid> 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: Achim Gratz Cc: emacs-orgmode@gnu.org This is a multi-part message in MIME format. --------------010108020503060802070804 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi, attached the new fix. Does the "v2" line count as changelog? Cheers, Simon On 05/07/2012 11:02 PM, Achim Gratz wrote: > Simon Thum writes: >> I'm sure there is a better way to fix this, but the attached patch >> helps me to not get something like "Warning: argument nil not >> recognized" spoiling every maxima result. > > I'd rather do this directly in the let form: > > - (let* ((cmdline (cdr (assoc :cmdline params))) > + (let* ((cmdline (or (cdr (assoc :cmdline params)) "")) > > And please provide a changelog with your patch. > > > Regards, > Achim. --------------010108020503060802070804 Content-Type: text/x-patch; name="0001-Org-Babel-fix-maxima-invocation-without-explicit-par.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-Org-Babel-fix-maxima-invocation-without-explicit-par.pa"; filename*1="tch" >From 63e9747d81f07abdc05db2f7754c8f7adbb1b2c6 Mon Sep 17 00:00:00 2001 From: Simon Thum Date: Tue, 8 May 2012 13:31:11 +0200 Subject: [PATCH] Org-Babel: fix maxima invocation without explicit parameters v2: fix in the let form as suggested by Achim Gratz Signed-off-by: Simon Thum --- lisp/ob-maxima.el | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lisp/ob-maxima.el b/lisp/ob-maxima.el index b092e13..21bae78 100644 --- a/lisp/ob-maxima.el +++ b/lisp/ob-maxima.el @@ -70,7 +70,7 @@ called by `org-babel-execute-src-block'." (message "executing Maxima source code block") (let ((result-params (split-string (or (cdr (assoc :results params)) ""))) (result - (let* ((cmdline (cdr (assoc :cmdline params))) + (let* ((cmdline (or (cdr (assoc :cmdline params)) "")) (in-file (org-babel-temp-file "maxima-" ".max")) (cmd (format "%s --very-quiet -r 'batchload(%S)$' %s" org-babel-maxima-command in-file cmdline))) -- 1.7.3.4 --------------010108020503060802070804--