emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Berry, Charles" <ccberry@ucsd.edu>
To: stardiviner <numbchild@gmail.com>
Cc: emacs-org-mode <emacs-orgmode@gnu.org>
Subject: Re: header argument :noweb-ref seems can't be resolved
Date: Mon, 18 Dec 2017 04:12:10 +0000	[thread overview]
Message-ID: <8C1BE6FC-D004-49A9-82F5-03181061E848@ucsd.edu> (raw)
In-Reply-To: <f57a4358-91e9-1bad-316b-b72ccde380ac@gmail.com>



> On Dec 17, 2017, at 6:08 PM, stardiviner <numbchild@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	other threads:[~2017-12-18  4:12 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-17 14:58 header argument :noweb-ref seems can't be resolved stardiviner
2017-12-17 17:40 ` Berry, Charles
2017-12-18  2:08   ` stardiviner
2017-12-18  4:12     ` Berry, Charles [this message]
2017-12-18  4:28       ` stardiviner
2017-12-18 16:46         ` Berry, Charles
2017-12-18 17:28           ` numbchild
2017-12-19  4:59             ` Berry, Charles
2017-12-19  7:31               ` [BUG] " stardiviner
2017-12-19 17:49                 ` Berry, Charles
2017-12-19 19:00                   ` Nicolas Goaziou
2017-12-20  5:32                     ` Berry, Charles
2017-12-20 12:23                       ` Nicolas Goaziou
2017-12-20 15:41                         ` numbchild

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=8C1BE6FC-D004-49A9-82F5-03181061E848@ucsd.edu \
    --to=ccberry@ucsd.edu \
    --cc=emacs-orgmode@gnu.org \
    --cc=numbchild@gmail.com \
    /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).