3

I have a org-mode file (test.org) as below:

#+NAME: my-tangle-to-file
#+BEGIN_SRC sh :tangle my_tangle_file.sh :dir /tmp :shebang "#!/usr/bin/env bash"
  me=$(basename $(test -L "$0" && readlink "$0" || echo "$0"))
  echo "I was tangled to a file (${me})"
#+END_SRC

How could I tangle/evaluate the source block my-tangle-to-file in batch mode?

Enze Chi
  • 1,410
  • 12
  • 28

1 Answers1

2

Does the instructions at http://orgmode.org/manual/Batch-execution.html do what you want?

joon
  • 690
  • 7
  • 17
  • My situation is a little bit complicated. I use emacs-starter-kit to management my setup and I use some home-made functions in the source block header. It seems the `emacs --batch` can't pick my setup. End up with emacs complains about can't find those home-made functions. – Enze Chi Feb 04 '16 at 21:42
  • I see - I'm sorry I don't have a good solution for you at the moment. – joon Feb 08 '16 at 19:40