Aloha Marcelo, Marcelo de Moraes Serpa <celose...@gmail.com> writes:
> I still don't understand why the TARGET_FILE argument is optional. I would > expect it to create a file of the same name of the org file that is > tangled. Here is the docstring: (org-babel-tangle-file FILE &optional TARGET-FILE LANG) Extract the bodies of source code blocks in FILE. Source code blocks are extracted with `org-babel-tangle'. Optional argument TARGET-FILE can be used to specify a default export file for all source blocks. Optional argument LANG can be used to limit the exported source code blocks by language. I suppose it is optional so you don't have to specify a default export file for all source blocks. What if you want to tangle two or more files from the same Org buffer? > Take this code: > > (org-babel-tangle-file "~/.emacs.d/config/peepopen-config.org") > > Contents: > > * Load it >> #+BEGIN_SRC emacs-lisp >> (add-to-list 'load-path (concat fullofcaffeine-vendor-dir "/peepopen")) >> (require 'peepopen) >> (textmate-mode) >> (provide 'peepopenconfig) >> #+END_SRC > > > When I evaluate the (org-babel-tangle-file...) line, I get the following: > > Tangled 0 code blocks from peepopen-config.org Well, by default :tangle no, so unless you've changed this somewhere I think Babel will defer to the default value. hth, Tom -- T.S. Dye & Colleagues, Archaeologists 735 Bishop St, Suite 315, Honolulu, HI 96813 Tel: 808-529-0866, Fax: 808-529-0884 http://www.tsdye.com