[Top][All Lists]

[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:20:26 -0700

Hah, this is what I get for not reading carefully enough. I wonder if
it is possible to stick <<racket-helper>> in the prologue and have it

On Fri, Aug 7, 2020 at 9:18 PM Tom Gillespie <tgbugs@gmail.com> wrote:
> 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
> : 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

reply via email to

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