[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Can you automatically noweb include?
From: |
Tom Gillespie |
Subject: |
Re: Can you automatically noweb include? |
Date: |
Fri, 7 Aug 2020 21:18:30 -0700 |
I don't see a direct answer to the original question in the thread, so
here is an example of how I do it taken from
https://raw.githubusercontent.com/SciCrunch/sparc-curation/master/docs/developer-guide.org.
You can ctrl-f for racket-graph-helper to see the relevant blocks. A
reduced version is below. Recall that I use
https://github.com/wallyqs/ob-racket. I use this pattern all over the
place in my org blocks. Best,
Tom
* Use the code
:cache yes"
#+begin_src racket :lang racket/base :noweb yes
<<racket-helper>>
(helper-function "this should work")
#+end_src
#+RESULTS:
: this should work hello world
* Define the helpers
#+name: racket-helper
#+header: :prologue "#lang racket/base"
#+begin_src racket :lang racket/base
(define (helper-function arg)
(string-append arg " hello world"))
#+end_src
- Can you automatically noweb include?, George Mauer, 2020/08/05
- Re: Can you automatically noweb include?, Ken Mankoff, 2020/08/05
- Re: Can you automatically noweb include?, Ken Mankoff, 2020/08/06
- Re: Can you automatically noweb include?, William McCoy, 2020/08/07
- Re: Can you automatically noweb include?, Berry, Charles, 2020/08/07
- Re: Can you automatically noweb include?, William McCoy, 2020/08/07
- Re: Can you automatically noweb include?, Thomas S. Dye, 2020/08/07
- Re: Can you automatically noweb include?, Berry, Charles, 2020/08/07
- Re: Can you automatically noweb include?, William McCoy, 2020/08/07
- Re: Can you automatically noweb include?, George Mauer, 2020/08/08
- Re: Can you automatically noweb include?,
Tom Gillespie <=