From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nuno Salgado Subject: Re: noweb Date: Thu, 23 Jan 2020 00:18:47 +0000 Message-ID: <877e1jqb2w.fsf@nulle1.home> References: <87sgk7qnxb.fsf@nulle1.home> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:35074) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iuQD8-0001Wj-O2 for Emacs-orgmode@gnu.org; Wed, 22 Jan 2020 19:19:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iuQD1-0000Q4-Ga for Emacs-orgmode@gnu.org; Wed, 22 Jan 2020 19:18:58 -0500 Received: from salgado.eu ([37.59.126.250]:35660 helo=cosov1.salgado.eu) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iuQD1-0000Ow-AU for Emacs-orgmode@gnu.org; Wed, 22 Jan 2020 19:18:55 -0500 In-Reply-To: (Diego Zamboni's message of "Wed, 22 Jan 2020 23:14:19 +0100") 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-mx.org@gnu.org Sender: "Emacs-orgmode" To: Diego Zamboni Cc: Org-mode Diego, Thank you for your help. Yes, I want the scripts to be all in one file in order to execute them all. But it's nice do execute then individualy (C-c C-c) to test and debug. I think I have to have 2 blocks of code for each script: one for tangle, with no <> and another to test, with <> and <>; N Diego Zamboni writes: > Hi Nuno, > > ":noweb eval" means that noweb references are only expanded during > evaluation of the code, but not during export. This is why you get > the literal <> references in exported output. Here are the > possible values of :noweb and what they mean:=C2=A0https://orgmode.org/ > manual/noweb.html > > Also note that if all of this is in the same file, both Script1 and > Script2 will be tangled to the same file, you may want to specify > different filenames as the value of :tangle (see=C2=A0https://orgmode.org/ > manual/tangle.html#tangle). > > Hope this=C2=A0helps, > --Diego > > > On Wed, Jan 22, 2020 at 8:41 PM Nuno Salgado wrote: > > Hi, > > I'm writing an installation script in org-mode. > > I'm doing something like this: > > =C2=A0 Vars definition: > =C2=A0 #+NAME:DEFVARS > =C2=A0 #+BEGIN_SRC shell :tangle yes > =C2=A0 =C2=A0 v1=3D1; > =C2=A0 =C2=A0 v2=3D2; > =C2=A0 #+END_SRC > > =C2=A0 Script1: > =C2=A0 #+BEGIN_SRC shell :tangle yes :noweb eval > =C2=A0 =C2=A0 <> > =C2=A0 =C2=A0 echo $v1; > =C2=A0 #+END_SRC > > =C2=A0 Script2: > =C2=A0 #+BEGIN_SRC shell :tangle yes :noweb eval > =C2=A0 =C2=A0 <> > =C2=A0 =C2=A0 echo $v2; > =C2=A0 =C2=A0 echo $v1; > =C2=A0 #+END_SRC > > This works great when I do C-c C-c in each script. > > But when I do org-babel-tangle, the code gets two <>. > > Does it makes sense? Since I set noweb =3D eval why does it exports > <>? > > Could you please help me turning around this problem without > removing every reference <> > > Thank you very much. > > > Regards, > NS >