From: Frederick Giasson <fred@curbside.com>
To: emacs-orgmode@gnu.org
Subject: Issues with org-babel-detangle and :comments noweb
Date: Mon, 28 May 2018 13:32:06 -0400 [thread overview]
Message-ID: <CADjL5rV9j5F7JQF6QREb6aa+oJvzXhvg78zn36qoj3EtXak3og@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1461 bytes --]
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
<<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 "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
[-- Attachment #2: Type: text/html, Size: 2141 bytes --]
next reply other threads:[~2018-05-28 17:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-28 17:32 Frederick Giasson [this message]
2018-06-15 17:14 ` Issues with org-babel-detangle and :comments noweb Grant Rettke
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CADjL5rV9j5F7JQF6QREb6aa+oJvzXhvg78zn36qoj3EtXak3og@mail.gmail.com \
--to=fred@curbside.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).