From mboxrd@z Thu Jan 1 00:00:00 1970 From: stardiviner Subject: Re: header argument :noweb-ref seems can't be resolved Date: Mon, 18 Dec 2017 12:28:06 +0800 Message-ID: <65375b87-03d9-45bb-6529-f5473c4d6af7@gmail.com> References: <65580a97-24c4-a54c-655f-c37fcddd2cd1@gmail.com> <580C6094-17BE-44C7-8F4C-8BAF3113AA40@ucsd.edu> <8C1BE6FC-D004-49A9-82F5-03181061E848@ucsd.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56712) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eQn2E-0006lI-Ru for emacs-orgmode@gnu.org; Sun, 17 Dec 2017 23:28:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eQn2B-0006Yd-Mi for emacs-orgmode@gnu.org; Sun, 17 Dec 2017 23:28:14 -0500 Received: from mail-pl0-x22e.google.com ([2607:f8b0:400e:c01::22e]:40269) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eQn2B-0006Xz-Gw for emacs-orgmode@gnu.org; Sun, 17 Dec 2017 23:28:11 -0500 Received: by mail-pl0-x22e.google.com with SMTP id 62so2677827pld.7 for ; Sun, 17 Dec 2017 20:28:11 -0800 (PST) In-Reply-To: <8C1BE6FC-D004-49A9-82F5-03181061E848@ucsd.edu> Content-Language: en-US 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: "Berry, Charles" Cc: emacs-org-mode 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 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 >> <> >> #+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 > > >