From mboxrd@z Thu Jan 1 00:00:00 1970 From: tsd@tsdye.com (Thomas S. Dye) Subject: Re: org-babel-tangle-file not parsing code blocks Date: Mon, 25 Mar 2013 14:58:47 -1000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:48353) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKIE9-0006ma-RQ for emacs-orgmode@gnu.org; Mon, 25 Mar 2013 20:59:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UKIE4-0002Mt-Na for emacs-orgmode@gnu.org; Mon, 25 Mar 2013 20:59:01 -0400 Received: from oproxy14-pub.unifiedlayer.com ([67.222.51.224]:40229) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1UKIE4-0002Mc-Ey for emacs-orgmode@gnu.org; Mon, 25 Mar 2013 20:58:56 -0400 In-Reply-To: (Marcelo de Moraes Serpa's message of "Mon, 25 Mar 2013 17:48:35 -0600") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Marcelo de Moraes Serpa Cc: Org Mode Aloha Marcelo, Marcelo de Moraes Serpa 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