From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo de Moraes Serpa Subject: Re: org-babel-tangle-file not parsing code blocks Date: Mon, 25 Mar 2013 17:48:35 -0600 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=14dae93a0c177672c004d8c87117 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:35253) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKH82-0005hv-0x for emacs-orgmode@gnu.org; Mon, 25 Mar 2013 19:48:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UKH80-0006Cx-E0 for emacs-orgmode@gnu.org; Mon, 25 Mar 2013 19:48:37 -0400 Received: from mail-oa0-f52.google.com ([209.85.219.52]:51021) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKH80-0006Cp-6Z for emacs-orgmode@gnu.org; Mon, 25 Mar 2013 19:48:36 -0400 Received: by mail-oa0-f52.google.com with SMTP id k14so6882129oag.25 for ; Mon, 25 Mar 2013 16:48:35 -0700 (PDT) In-Reply-To: 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: "Thomas S. Dye" Cc: Org Mode --14dae93a0c177672c004d8c87117 Content-Type: text/plain; charset=ISO-8859-1 Hi Thomas. Thanks again for the reply. 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. 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 I would expect it to tangle 1 block, and create a peepopen-config.el (no need to define a TARGET_FILE string). Two questions: 1) Not sure why it's not tangling the BEGIN_SRC emacs-lisp block 2) Am I wrong about the .el file creation assumption ? Cheers! - Marcelo. On Mon, Mar 25, 2013 at 5:39 PM, Thomas S. Dye wrote: > Aloha Marcelo, > > Marcelo de Moraes Serpa writes: > > > Oh, actually that wasn't the issue. > > > > org-babel-load-file seems to force tangling the file to an .el. > > org-babel-tangle-file doesn't. Is there a way to force the output to the > > .el file without using the parameter in the code block itself? > > > > Yes, there is. > > (org-babel-tangle-file FILE &optional TARGET-FILE LANG) > > You should be able set TARGET-FILE with a buffer-wide header argument, > like this: > > #+PROPERTY: tangle force-output-to-the.el > > 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 > --14dae93a0c177672c004d8c87117 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Thomas. Thanks again for the reply.

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. Take this c= ode:

(org-babel-tangle-file "~/.emacs.d/config/peepopen-config.org")

Contents:

* Load it
#+BEGIN_SRC emacs-lisp
=A0 (add-to-list 'load-path (con= cat fullofcaffeine-vendor-dir "/peepopen"))
=A0 (require '= peepopen)
=A0 (textmate-mode)
(provide 'peepopenconfig)
#+END_= SRC

When I evaluate the (org-babel-tangle-file...) li= ne, I get the following:

Tangled 0 code blocks from peepopen-= config.org

I would expect it to t= angle 1 block, and create a peepopen-config.el (no need to define a TARGET_= FILE string).

Two questions:

1) Not sure why= it's not tangling the BEGIN_SRC emacs-lisp block
2) Am I wro= ng about the .el file creation assumption ?

Cheers= !

- Marcelo.

On Mon, = Mar 25, 2013 at 5:39 PM, Thomas S. Dye <tsd@tsdye.com> wrote:
Aloha Marcelo,

Marcelo de Moraes Serpa <celoserp= a@gmail.com> writes:

> Oh, actually that wasn't the issue.
>
> org-babel-load-file seems to force tangling the file to an .el.
> org-babel-tangle-file doesn't. Is there a way to force the output = to the
> .el file without using the parameter in the code block itself?
>

Yes, there is.

(org-babel-tangle-file FILE &optional TARGET-FILE LANG)

You should be able set TARGET-FILE with a buffer-wide header argument,
like this:

#+PROPERTY: tangle force-output-to-the.el

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=

--14dae93a0c177672c004d8c87117--