recently, I started playing with org-mode for emacs (http://orgmode.org). From the homepage:
What I thought might be of interest to you guys is org-babel, which allows for the execution of code blocks for supported languages. It doesn't look too hard to add languages, and I thought newlisp might be a candidate.Org-mode is for keeping notes, maintaining ToDo lists, doing project planning, and authoring with a fast and effective plain-text system.
here's the babel page with links to tutorials and languages info:
http://orgmode.org/worg/org-contrib/babel/index.php