I can't find `org-babel-noweb-ref-resolve` in any of org-mode `master` branch source code.

I use `counsel-git-grep` searched through the repository. Not found.

Can you point out where is it?


On 12/18/2017 12:12 PM, Berry, Charles wrote:

On Dec 17, 2017, at 6:08 PM, stardiviner <numbch...@gmail.com> wrote:

The example I original copied from is Emacs org-mode info.
So I rewrite a hand typing content again:
```org
* Test

#+begin_src shell :tangle yes :noweb yes :shebang #!/bin/sh
<<fullest-disk>>
#+end_src

** the mount point of the fullest disk
:PROPERTIES:
:header-args: :noweb-ref fullest-disk
:END:

*** query all mount disks

#+begin_src shell
df \
#+end_src

*** strip the header row

#+begin_src shell
| sed '1d' \
#+end_src

*** output mount point of fullest disk

#+begin_src shell
| awk '{if (u < +$5) {u = +$5; m = $6}} END {print m}'
#+end_src
```

I can preview the first src block with [C-c C-v v] now. It is correct:
```shell
df \
| sed '1d' \
| awk '{if (u < +$5) {u = +$5; m = $6}} END {print m}'
```
I can tangle it with [C-c C-v t] to same file name shell script 
`babel-noweb-ref.sh`.

But just can't run [C-c C-v e] or [C-c C-]. (Reports same error)
Seems org-mode can find correct noweb-ref for tangle but can't for eval.
Nor can I.

After a good while, I cannot figure how this works in tangle, but not execute. The calls 
to `org-babel-noweb-ref-resolve' look the same, but in tangle it returns the :noweb-ref 
src blocks while in execute "" is returned.

FWIW, labelling the individual src-blocks with the :noweb-ref header seems to 
work.

Chuck





Reply via email to