From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sean O'Halpin" Subject: Re: Illiterate programming question Date: Fri, 1 Apr 2011 03:29:02 +0100 Message-ID: References: <4D93935B.1020402@sift.info> <8766.1301520804@alphaville.usa.hp.com> <4D93A425.9070604@sift.info> <87mxkcrzk7.fsf@gmail.com> <4998.1301602410@alphaville.usa.hp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=33012 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q5U6j-0004Je-6D for emacs-orgmode@gnu.org; Thu, 31 Mar 2011 22:29:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q5U6i-0003t5-84 for emacs-orgmode@gnu.org; Thu, 31 Mar 2011 22:29:05 -0400 Received: from mail-bw0-f41.google.com ([209.85.214.41]:60846) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q5U6i-0003sy-0o for emacs-orgmode@gnu.org; Thu, 31 Mar 2011 22:29:04 -0400 Received: by bwz17 with SMTP id 17so2571389bwz.0 for ; Thu, 31 Mar 2011 19:29:03 -0700 (PDT) In-Reply-To: <4998.1301602410@alphaville.usa.hp.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: nicholas.dokos@hp.com Cc: Org Mode , rpgoldman@sift.info On Thu, Mar 31, 2011 at 9:13 PM, Nick Dokos wrote: > Sean O'Halpin wrote: > >> 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. =A0While it isn't perfect (especi= ally >> > if you make extensive use of noweb references or variables) there are >> > mechanisms to maintain such a /sync/. =A0To try this out, tangle out c= ode >> > with the ":comments yes" header argument, then change an element of th= e >> > tangled source code, and use the `org-babel-detangle' function to brin= g >> > the changes back into the Org-mode document. >> > >> > Improving the detangling (or "illiterate") features is an area ripe fo= r >> > future Babel development. >> > >> > Cheers -- Eric >> > >> > >> Hi, >> >> Could anyone please give a working example of this? I tried tangling >> the following: >> >> =A0 =A0* A tangle example >> >> =A0 =A0#+source: body >> =A0 =A0#+begin_src ruby :comments yes :noweb yes >> =A0 =A0 =A0puts "hello" >> =A0 =A0#+end_src >> >> =A0 =A0#+source: method >> =A0 =A0#+begin_src ruby :comments yes :noweb yes >> =A0 =A0 =A0def hello >> =A0 =A0 =A0 =A0<> >> =A0 =A0 =A0end >> =A0 =A0#+end_src >> >> =A0 =A0#+source: main >> =A0 =A0#+begin_src ruby :comments yes :tangle detangle.rb :noweb yes >> =A0 =A0 =A0<> >> =A0 =A0 =A0hello >> =A0 =A0#+end_src >> >> and got the output: >> >> =A0 =A0# [[][main]] >> >> =A0 =A0def hello >> =A0 =A0 =A0puts "hello" >> =A0 =A0end >> =A0 =A0hello >> >> =A0 =A0# main ends here >> >> which doesn't look right to me. >> > > What should it look like? > > Nick > To be honest, I don't know what it /should/ look like but I have ':comments= yes' on three sections and get only one link on output, so I can't see how this would detangle properly. Also, # [[][main]] is missing the file reference (in the first set of brackets), so it won't work as a link. Regards, Sean P.S. Apologies again for not replying to all first time.