On 4/5/20, Karl Meakin <[email protected]> wrote:
>  I want to write my dotfiles in literate programming style. As far as I can
>
> tell, everyone does this using Emac's org-mode. I'd rather use a
> fully-fledged programming language (and not be tied to a particular
> editor). Is it possible to achieve this using Scribble? In particular, I'd
> like to be able to designate sections of text in the same input file as
> outputting to different output files (for example, output one section to
> .bashrc and another section to .vimrc).
>
> Thanks in advance.

This is definitely possible, but maybe not easy.

I'd first try writing a racket program with Scribble submodules, and
have the outer program invoke a renderer on each submodule

```
#lang racket

(module dotfile-1 scribble/???
  ....)

(require (rename-in 'dotfile-1 [doc doc:1]))

(???-render doc:1)
```

If that doesn't work, then I'd try making the outer module
scribble/manual and writing a function that renders one codeblock to a
file.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAFUu9R47ctq2xqq7vtFxX5nTsuggTyTgsrhPfqF3ErpKiSHsFA%40mail.gmail.com.

Reply via email to