From mboxrd@z Thu Jan 1 00:00:00 1970 From: Frederick Giasson Subject: Issues with org-babel-detangle and :comments noweb Date: Mon, 28 May 2018 13:32:06 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000002115ab056d477f5c" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:32859) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fNM08-0000Cf-Je for emacs-orgmode@gnu.org; Mon, 28 May 2018 13:32:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fNM07-0007kk-Lu for emacs-orgmode@gnu.org; Mon, 28 May 2018 13:32:08 -0400 Received: from mail-qk0-x231.google.com ([2607:f8b0:400d:c09::231]:38507) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fNM07-0007kE-G0 for emacs-orgmode@gnu.org; Mon, 28 May 2018 13:32:07 -0400 Received: by mail-qk0-x231.google.com with SMTP id c23-v6so9604653qkb.5 for ; Mon, 28 May 2018 10:32:07 -0700 (PDT) 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" To: emacs-orgmode@gnu.org --0000000000002115ab056d477f5c Content-Type: text/plain; charset="UTF-8" Hi Everybody, I am trying to have noweb references working with org-babel-detangle. Let's use this example: ``` #+NAME: a #+BEGIN_SRC clojure (def a "a") #+END_SRC #+NAME: b #+BEGIN_SRC clojure (def a "b") #+END_SRC #+NAME: c #+BEGIN_SRC clojure (def a "c") #+END_SRC #+NAME: a #+BEGIN_SRC clojure (def a "a") #+END_SRC #+NAME: test #+BEGIN_SRC clojure :tangle test.clj :mkdirp yes :noweb yes :padline yes :results silent :comments noweb <> <> <> #+END_SRC ``` Once tangled, the test.clj file looks like: ``` ;; [[file:test.org::test][test]] ;; [[file:test.org::a][a]] (def a "a") ;; a ends here ;; [[file:test.org::a][a]] (def a "a") ;; a ends here ;; [[file:test.org::b][b]] (def a "b") ;; b ends here ;; [[file:test.org::c][c]] (def a "c") ;; c ends here ;; test ends here ``` If I perform org-babel-tangle-jump-to-org everything works fine, I jump to the block codes. However if I perform org-babel-detangle, when I get the message "Not in tangle code". The problem appears to be that the references are "embedded" in the tangled block code. If I move the "test ends here" above, then it works, but then when the tangled block code get detangled, I loose the noweb references. Any idea if there is a work around for that? I would like to use org-babel-tangle-jump-to-org and org-babel-detangle while being about to change the order of the code within the block codes in the tangled file. Thanks! Take care, Fred --0000000000002115ab056d477f5c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Everybody,

I am trying to= have noweb references working with org-babel-detangle. Let's use this = example:

```
#+NAME: a
#+BEGIN_SRC cl= ojure

(def a "a")

#+END_SRC

#+NAME: b
#+B= EGIN_SRC clojure

(def a "b")

#+END_SRC

#+NAM= E: c
#+BEGIN_SRC clojure

(def a "c")

#+END_SRC
#+NAME: a
#+BEGIN_SRC clojure

(def a "a")

= #+END_SRC


#+NAME: test
#+BEGIN_SRC clojure :tangle test.clj := mkdirp yes :noweb yes :padline yes :results silent :comments noweb

&= lt;<a>>
<<b>>
<<c>>

#+END_SRC=

```


Once tangled= , the test.clj file looks like:

```
;; [= [file:test.org::test][test]]
;; [[file:test.org::a][a]]

(def a &q= uot;a")

;; a ends here
;; [[file:test.org::a][a]]

(de= f a "a")

;; a ends here
;; [[file:test.org::b][b]]
<= br>(def a "b")

;; b ends here
;; [[file:test.org::c][c]= ]

(def a "c")

;; c ends here
;; test ends here
```

If I perform org-babel-tangle-jum= p-to-org=C2=A0 everything works fine, I jump to the block codes.
=
However if I perform org-babel-detangle, when I get the mess= age "Not in tangle code". The problem appears to be that the refe= rences are "embedded" in the tangled block code. If I move the &q= uot;test ends here" above, then it works, but then when the tangled bl= ock code get detangled, I loose the noweb references.

<= div>Any idea if there is a work around for that? I would like to use org-ba= bel-tangle-jump-to-org and org-babel-detangle while being about to change = the order of the code within the block codes in the tangled file.

Thanks!

Take care,

<= /div>
Fred

--0000000000002115ab056d477f5c--