From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sean O'Halpin" Subject: Re: Illiterate programming question Date: Thu, 31 Mar 2011 21:09:18 +0100 Message-ID: References: <4D93935B.1020402@sift.info> <8766.1301520804@alphaville.usa.hp.com> <4D93A425.9070604@sift.info> <87mxkcrzk7.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from [140.186.70.92] (port=40585 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q5OBF-0005OS-DP for emacs-orgmode@gnu.org; Thu, 31 Mar 2011 16:09:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q5OBE-0005hM-EJ for emacs-orgmode@gnu.org; Thu, 31 Mar 2011 16:09:21 -0400 Received: from mail-bw0-f41.google.com ([209.85.214.41]:53987) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q5OBE-0005hH-9o for emacs-orgmode@gnu.org; Thu, 31 Mar 2011 16:09:20 -0400 Received: by bwz17 with SMTP id 17so2381645bwz.0 for ; Thu, 31 Mar 2011 13:09:19 -0700 (PDT) In-Reply-To: <87mxkcrzk7.fsf@gmail.com> 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: Eric Schulte Cc: nicholas.dokos@hp.com, Org Mode , rpgoldman@sift.info On Wed, Mar 30, 2011 at 11:52 PM, Eric Schulte wrote: > Babel does have a way to bring changes back from pure source code into > code blocks in an Org-mode document. While it isn't perfect (especially > if you make extensive use of noweb references or variables) there are > mechanisms to maintain such a /sync/. To try this out, tangle out code > with the ":comments yes" header argument, then change an element of the > tangled source code, and use the `org-babel-detangle' function to bring > the changes back into the Org-mode document. > > Improving the detangling (or "illiterate") features is an area ripe for > future Babel development. > > Cheers -- Eric > > Hi, Could anyone please give a working example of this? I tried tangling the following: * A tangle example #+source: body #+begin_src ruby :comments yes :noweb yes puts "hello" #+end_src #+source: method #+begin_src ruby :comments yes :noweb yes def hello <> end #+end_src #+source: main #+begin_src ruby :comments yes :tangle detangle.rb :noweb yes <> hello #+end_src and got the output: # [[][main]] def hello puts "hello" end hello # main ends here which doesn't look right to me. Regards, Sean