emacs-orgmode
[Top][All Lists]
Advanced

[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



reply via email to

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