From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: A tool for creating source code files from example and src blocks in org files Date: Sat, 27 Jun 2009 13:31:29 -0700 Message-ID: References: <4A257492.5030300@fnal.gov> <871vpk5l9h.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MKeYm-0007rO-0K for emacs-orgmode@gnu.org; Sat, 27 Jun 2009 16:31:40 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MKeYh-0007qI-H3 for emacs-orgmode@gnu.org; Sat, 27 Jun 2009 16:31:39 -0400 Received: from [199.232.76.173] (port=37269 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MKeYh-0007qF-CM for emacs-orgmode@gnu.org; Sat, 27 Jun 2009 16:31:35 -0400 Received: from rv-out-0708.google.com ([209.85.198.241]:1311) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MKeYg-0005aE-UV for emacs-orgmode@gnu.org; Sat, 27 Jun 2009 16:31:35 -0400 Received: by rv-out-0708.google.com with SMTP id k29so1439703rvb.6 for ; Sat, 27 Jun 2009 13:31:33 -0700 (PDT) In-Reply-To: (Eric Schulte's message of "Fri, 26 Jun 2009 12:15:46 -0700") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bastien Cc: emacs-orgmode@gnu.org "Eric Schulte" writes: > Bastien writes: > >> "Eric H. Neilsen, Jr." writes: >> >>> Is there any interest in this? >> >> Yes. It's been a long time I want to use Org for literate programming, >> I think it's just the right tool to do this. >> >> Please send any code we can test! >> >>> (If anyone feels like rewriting it, that would be even better; aside >>> from a fairly straightforward .emacs, this is my first ever lisp code, >>> so it is likely to need cleaning and refactoring.) >> >> I may help if I have some time. > > I have started re-implementing this as part of org-babel [1], please > checkout the "tangle" branch [2] of org-babel for source-code and more > information. > This tangle implementation has now reached an initial level of functionality. It is able to extract blocks from an org-mode file by language and by session (which has a specific meaning in org-babel) and create source-code files. This doesn't yet have support for fine-grained control for inserting into specific locations of source-code files, and I'm not familiar enough with literate programming to know the best way to structure such support. This is now merged into the master branch of org-babel. To give it a try, open the test-tangle.org file in the base of the repo, and run `org-babel-tangle'. Best -- Eric > > Cheers -- Eric > > Footnotes: > [1] http://github.com/eschulte/org-babel/tree/master > > [2] http://github.com/eschulte/org-babel/tree/tangle