From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: problem with babel call with post action Date: Thu, 22 Jun 2017 16:32:53 +0100 Message-ID: <878tkkavh6.fsf@delle7240.chemeng.ucl.ac.uk> References: <874lvaadbt.fsf@delle7240.chemeng.ucl.ac.uk> <7f25f31c2d8946deb9f1ac6d35fede98@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> <878tkllwhm.fsf@t3610> <7d0fe5cb25c04ee3bc8331ed0138a19f@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> Reply-To: Eric S Fraga Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33324) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dO46b-0003DT-8L for emacs-orgmode@gnu.org; Thu, 22 Jun 2017 11:33:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dO46T-00071w-Ri for emacs-orgmode@gnu.org; Thu, 22 Jun 2017 11:33:13 -0400 Received: from mail-ve1eur01on0101.outbound.protection.outlook.com ([104.47.1.101]:45247 helo=EUR01-VE1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dO46T-0006zd-A4 for emacs-orgmode@gnu.org; Thu, 22 Jun 2017 11:33:05 -0400 In-Reply-To: <7d0fe5cb25c04ee3bc8331ed0138a19f@HE1PR01MB1898.eurprd01.prod.exchangelabs.com> (Nicolas Goaziou's message of "Thu, 22 Jun 2017 07:30:30 +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: emacs-orgmode@gnu.org --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Helps if I attached the file... -- : Eric S Fraga via Emacs 26.0.50, Org release_9.0.9-551-g92e8c8 --=-=-= Content-Type: text/x-org Content-Disposition: attachment; filename=callexample.org A small example in which the ~call~ statement below fails with error message: Successfully reloaded Org #+begin_example Org mode version 9.0.9 (release_9.0.9-551-g92e8c8 @ /home/ucecesf/git/org-mode/lisp/) Evaluate this emacs-lisp code block on your system? (y or n) y executing Emacs-Lisp code block... (options (quote "rankdir=LR;")) (nodes (quote (("start" "start" "ellipse" "" "") ("one" "first" "" "" "the first task") ("two" "second" "" "" "second task") ("end" "End" "ellipse" "" "project complete")))) (graph (quote (("start" "one" "") ("start" "two" "") ("one" "end" "test") ("two" "end" "")))) Evaluate this dot code block (plot-graph) on your system? (y or n) y executing Dot code block (plot-graph)... Wrote /tmp/babel-7617mN6/ob-input-7617ncr "[[file:dependency-graph.pdf]]" org-indent-add-properties: Wrong type argument: arrayp, nil #+end_example * Overview :ignoreheading: #+call: graph-from-tables(options="rankdir=LR;",nodes=subtasks-table[2:-1],graph=dependency-table[2:-1]) :exports results :results file :post plot-graph[:results file :exports results :file dependency-graph.pdf](graph=*this*) #+name: subtasks-table | node | label | shape | colour | description | |----------+----------+---------+--------+----------------------------------| | start | start | ellipse | | | | one | first | | | the first task | | two | second | | | second task | | end | End | ellipse | | project complete | #+name: dependency-table | from | to | label | |----------+----------+-------| | start | one | | | start | two | | | one | end | test | | two | end | | * graph from table #+name: graph-from-tables #+header: :var options="" :var nodes='() graph='() #+BEGIN_SRC emacs-lisp :wrap src dot (concat "digraph {\n" options "\n" ;; "//rankdir=LR;\n" ;; remove comment characters '//' for horizontal layout; add for vertical layout (mapconcat (lambda (x) (format "%s [label=\"%s\" shape=%s style=\"filled\" fillcolor=\"%s\"]" (car x) (nth 1 x) (if (string= "" (nth 2 x)) "box" (nth 2 x)) (if (string= "" (nth 3 x)) "none" (nth 3 x)) )) nodes "\n") "\n" (mapconcat (lambda (x) (format "%s -> %s [taillabel=\"%s\"]" (car x) (nth 1 x) (nth 2 x))) graph "\n") "}\n") #+END_SRC #+name: plot-graph #+begin_src dot :var graph="digraph { anode;}" :file graph.pdf $graph #+end_src --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQSPXCedOQfhSlwpVw3IkZPY//z2fQUCWUvjJQAKCRDIkZPY//z2 fUR2AKCEq4IQ0DpGTc1PL/fGBd5R+06hOgCeJnOvpRBO63ZkuuWjL+Hm71YasM0= =LfVk -----END PGP SIGNATURE----- --==-=-=--