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?

2

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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