From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: org-babel-execute-src-block on +#CALL statement? Date: Sun, 13 Jan 2019 15:56:49 +0100 Message-ID: <87lg3oy5am.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([209.51.188.92]:47543) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gihC3-0000YX-40 for emacs-orgmode@gnu.org; Sun, 13 Jan 2019 09:56:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gihC2-0007Sk-Er for emacs-orgmode@gnu.org; Sun, 13 Jan 2019 09:56:55 -0500 Received: from relay11.mail.gandi.net ([217.70.178.231]:54653) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gihC2-0007QV-8q for emacs-orgmode@gnu.org; Sun, 13 Jan 2019 09:56:54 -0500 In-Reply-To: (Joon Ro's message of "Sat, 12 Jan 2019 19:53:29 +0000") 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" To: Joon Ro Cc: "emacs-orgmode@gnu.org" Hello, Joon Ro writes: > Eventually I would like to batch-run a src block in a command line. > While investigating it, I found that org-babel-execute-src-block > throws "Wrong type argument: consp, nil" error when I run it over > a #+CALL statement. For example, I can run the test src block below > but it fails when the cursor is on the #+CALL block. > > #+NAME: test > #+BEGIN_SRC emacs-lisp > > (message "Success") #+END_SRC > > #+RESULTS: test > : Success > > #+CALL: test() > > I was wondering if this is a bug, Why would this be a bug? `org-babel-execute-src-block' is meant to execute source blocks. The Babel call line is not one of them. You need to extract the source block associated to it, with `org-babel-lob-get-info', and then pass it as an argument to `org-babel-execute-src-block'. > and if there is any way I can run #+CALL statement (preferably in the > batch mode)? I think the most straightforward way is to use `org-ctrl-c-ctrl-c'. Regards, -- Nicolas Goaziou