emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Table formula from code block
@ 2017-01-22 12:27 Roger Mason
  2017-01-23 12:04 ` Michael Welle
       [not found] ` <fbefc85e10fc401ebab2f7ef3794eade@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
  0 siblings, 2 replies; 13+ messages in thread
From: Roger Mason @ 2017-01-22 12:27 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

I have these code blocks:


================================================================================
#+BEGIN_SRC sh :tangle "skribilo_to_engine.sh"
#!/usr/local/bin/bash
infile=$3
engine=$2
skribilo=$1/skribilo

rm -rf $engine; mkdir -p $engine

result="Failed"
$skribilo  -t $engine -o $engine/$infile.$engine $infile.skb
[ "$(ls -A $engine)" ] && result="Success"

if [ -e "setup.tex" ]
then
mv setup.tex $engine/
fi

echo "$result"

#+END_SRC

#+BEGIN_SRC sh :results none
chmod u+x skribilo_to_engine.sh
#+END_SRC

#+NAME: skribilo_to_engine
#+BEGIN_SRC sh :results output replace :var path="/opt/skribilo-git/bin" :var engine="" :var infile="Author_7960"
./skribilo_to_engine.sh $path $engine $infile
#+END_SRC
===============================================================================


I tangle the code block and make it executable.  I think it should be
possible to run the code blocks from the table, but it errors out:

#+tblname: summaries
| engine  | To Engine |
|---------+-----------|
| context | #ERROR    |
#+TBLFM: $2='(org-sbe "skribilo_to_engine" (engine $1) )

(See
http://orgmode.org/worg/org-contrib/babel/intro.html#arguments-to-source-code-blocks).

What am I doing wrong?

Thanks,
Roger

GNU Emacs 25.1.1 (i386-portbld-freebsd10.1, GTK+ Version 2.24.29) of
2016-11-04

Org mode version 9.0.3 (release_9.0.3-170-gfed1cf)

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2017-01-25 15:03 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-22 12:27 Table formula from code block Roger Mason
2017-01-23 12:04 ` Michael Welle
2017-01-24 12:10   ` Roger Mason
2017-01-24 13:07     ` Michael Welle
2017-01-24 12:14   ` Michael Welle
     [not found] ` <fbefc85e10fc401ebab2f7ef3794eade@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2017-01-24  9:04   ` Eric S Fraga
2017-01-24 10:52     ` Michael Welle
     [not found]     ` <a780781601084f15802822fade909e25@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2017-01-24 11:43       ` Eric S Fraga
2017-01-24 13:38         ` Michael Welle
2017-01-24 14:14         ` Michael Welle
     [not found]         ` <3b626627d0e74bd69bcf3a7941acf9f8@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2017-01-24 16:13           ` Eric S Fraga
2017-01-25 14:19             ` Michael Welle
2017-01-24 13:01     ` Michael Welle

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).