I try to use emacs --batch
in Makefile to tangle my .org
files.
Here's my test org file (t.org)
* Another Header
#+BEGIN_SRC emacs-lisp
(message "Hello")
#+END_SRC
* Header 1
#+BEGIN_SRC emacs-lisp :tangle yes
(provide 't)
#+END_SRC
I use this command to try to tangle it to lisp/t.el
:
emacs -Q --batch --eval 'require (quote org))' --eval '(org-babel-tangle-file "t.org" "lisp/t.el" "emacs-lisp")'
Instead of get single file (lisp/t.el), I got 2 tangled files:
t.el
at current directory:(provide 't)
lisp/t.el
:(message "Hello")
Is that the expect behaviour? How could I tangle all the source blocks to single file (lisp/t.el
)?
Emacs: 25.0.94.1 (Built from source) Org-mode: 8.3.4 OS: Ubuntu 16.04