From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Charles R (Charlie) Martin" Subject: can't get org-mode noweb tangle to work Date: Fri, 24 Nov 2017 17:10:08 -0700 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="94eb2c19ad22029688055ec37e0b" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51595) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eIO2v-0002Z6-IR for emacs-orgmode@gnu.org; Fri, 24 Nov 2017 19:10:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eIO2u-0007zs-L6 for emacs-orgmode@gnu.org; Fri, 24 Nov 2017 19:10:13 -0500 Received: from mail-pg0-x231.google.com ([2607:f8b0:400e:c05::231]:37610) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eIO2u-0007wv-C9 for emacs-orgmode@gnu.org; Fri, 24 Nov 2017 19:10:12 -0500 Received: by mail-pg0-x231.google.com with SMTP id m4so6333117pgc.4 for ; Fri, 24 Nov 2017 16:10:10 -0800 (PST) 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: emacs-orgmode@gnu.org --94eb2c19ad22029688055ec37e0b Content-Type: text/plain; charset="UTF-8" I'm trying to get literate programming with `:noweb` syntax working in org-mode. I think I'm down to about the minimum case: #+TITLE: Console Tic Tac Toe #+SUBTITLE: A Literate Program in EMACS Org-Mode #+AUTHOR: Charlie Martin #+STARTUP: showall #+BEGIN_SRC python :tangle yes :noweb import sys import os def main(args): <> if __name__ == "__main__": main(sys.argv) #+END_SRC #+NAME: initialize-the-game-board #+BEGIN_SRC python :tangle yes :noweb board = [[-1 for x in range(3)] for y in range(3)] #+END_SRC but when I tangle it I get: import sys import os def main(args): <> if __name__ == "__main__": main(sys.argv) board = [[-1 for x in range(3)] for y in range(3)] I've tried permuting the argument, flags, and so on to no avail. EMACS version is 25.3.1 MacOS, org-mode 9.1.3 --94eb2c19ad22029688055ec37e0b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
= I'm trying to get literate programming with `:noweb` syntax working in = org-mode. I think I'm down to about the minimum case:

=C2=A0 =C2=A0 =C2= =A0 =C2=A0=C2=A0#+TITLE: Console Tic Ta= c Toe
=C2=A0 =C2=A0 #+SUBTITLE: A Literate Program in EMACS Org-Mode
= =C2=A0 =C2=A0 #+AUTHOR: Charlie Martin
=C2=A0 =C2=A0 #+STARTUP: showall
=C2=A0 =C2=A0=C2=A0
=C2=A0 =C2=A0 #+BEGIN_SRC python :tangle yes :noweb= =C2=A0
=C2=A0 =C2=A0 =C2=A0 import sys
=C2=A0 =C2=A0 =C2=A0 import os
=C2=A0 =C2=A0=C2=A0
=C2=A0 =C2=A0 =C2=A0 def main(args):
=C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 <<initialize-the-game-board>>
=C2=A0 = =C2=A0=C2=A0
=C2=A0 =C2=A0 =C2=A0 if __name__ =3D=3D "__main__"= :
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 main(sys.argv)
=C2=A0 =C2=A0 #+END= _SRC
=C2=A0 =C2=A0=C2=A0
=C2=A0 =C2=A0 #+NAME: initialize-the-game-boar= d
=C2=A0 =C2=A0 #+BEGIN_SRC python :tangle yes :noweb
=C2=A0 =C2=A0 =C2= =A0 board =3D [[-1 for x in range(3)] for y in range(3)]
=C2=A0 =C2=A0 #+= END_SRC

but when I tangle it I get:
=
=C2=A0 =C2=A0 import sys<= /div>
=C2= =A0 =C2=A0 import os
=C2=A0 =C2=A0=C2=A0
=C2=A0 =C2=A0 def main(args):<= /font>
= =C2=A0 =C2=A0=C2=A0
=C2=A0 =C2=A0 if __name__ =3D=3D "__main__"= :
=C2=A0 =C2=A0 =C2=A0 =C2=A0 main(sys.argv)
=C2=A0 =C2=A0=C2=A0=
=C2= =A0 =C2=A0 board =3D [[-1 for x in range(3)] for y in range(3)]

I'= ve tried permuting the argument, flags, and so on to no avail.

EMACS version is 25.3.1 MacOS, org-mode 9.1.3
--94eb2c19ad22029688055ec37e0b--