Previous: Key bindings and Useful Functions, Up: Working with Source Code [Contents][Index]
Org mode features, including working with source code facilities can be invoked from the command line. This enables building shell scripts for batch processing, running automated system tasks, and expanding Org mode’s usefulness.
The sample script shows batch processing of multiple files using
org-babel-tangle
.
#!/bin/sh # Tangle files with Org mode # emacs -Q --batch --eval " (progn (require 'ob-tangle) (dolist (file command-line-args-left) (with-current-buffer (find-file-noselect file) (org-babel-tangle)))) " "$@"