all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* can't get org-mode noweb tangle to work
@ 2017-11-25  0:10 Charles R (Charlie) Martin
  2017-11-25  0:26 ` Thomas S. Dye
  0 siblings, 1 reply; 5+ messages in thread
From: Charles R (Charlie) Martin @ 2017-11-25  0:10 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 974 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 3764 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-12-01 16:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-25  0:10 can't get org-mode noweb tangle to work Charles R (Charlie) Martin
2017-11-25  0:26 ` Thomas S. Dye
2017-11-25  0:52   ` Charles R (Charlie) Martin
2017-11-25  5:38     ` Martin Alsinet
2017-12-01  4:08       ` Grant Rettke

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.