News for hackers. Stuff that matters.
Re:Literate Programming: Empower Your Writing with Emacs Org... by bennofs on Sunday July 08, 2018 @10:51AM (#17484032)
With the noweb syntax, I think you can just write:

<<imports>>

code you want to show

and then later define what `imports` should be.

Re:Literate Programming: Empower Your Writing with Emacs Org... by andreareina on Sunday July 08, 2018 @12:02PM (#17484400)
Indeed. You can also define several `imports` blocks, and the contents of each block will be concatenated during expansion. So your literate source can have the imports located near where they're used, but in the tangled code they'll be up top where most people expect them to be.