emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] can't get org-mode noweb tangle to work


From: Thomas S. Dye
Subject: Re: [O] can't get org-mode noweb tangle to work
Date: Fri, 24 Nov 2017 14:26:53 -1000
User-agent: mu4e 0.9.17; emacs 25.3.1

Aloha Charlie,

Charles R (Charlie) Martin writes:

> 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):
>           <<initialize-the-game-board>>
>
>       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):
>         <<initialize-the-game-board>>
>
>     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

I think it should be :noweb yes

hth,
Tom

--
Thomas S. Dye
http://www.tsdye.com



reply via email to

[Prev in Thread] Current Thread [Next in Thread]