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})"

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

1 Answer 1


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

  • 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 4, 2016 at 21:42
  • I see - I'm sorry I don't have a good solution for you at the moment.
    – joon
    Feb 8, 2016 at 19:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.