Weeb style in org-babel

I am using Emacs 23 with Org 7.8.04. My code structure is as follows:

#+TITLE: hello, world!

#+BEGIN_SRC python :tangle yes :noweb yes
<<go_function>>
if __name__ == "__main__":
    go()
#+END_SRC

Define =go_function= as follows.

#+name:go_function
#+BEGIN_SRC python
def go:
    print "hello, world!"
#+END_SRC

When I tried to sing the documentation, <<go_function>>the first code fragment is exported to html, so I have two html exports <<go_function>>. I would like it to be <<go_function>>exported as a link that points to the actual definition at the end of the document. How can i do this?

+5
source share
1 answer

Try changing :noweb yesto :noweb tangle. The guide is very useful in such cases (see http://orgmode.org/manual/noweb.html ).

+7
source

All Articles