From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Illiterate programming question Date: Fri, 01 Apr 2011 01:46:45 -0400 Message-ID: <5975.1301636805@alphaville.dokosmarshall.org> 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> Reply-To: nicholas.dokos@hp.com Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=34543 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q5XCI-0007v0-Nn for emacs-orgmode@gnu.org; Fri, 01 Apr 2011 01:47:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q5XCH-0006Nr-9n for emacs-orgmode@gnu.org; Fri, 01 Apr 2011 01:47:02 -0400 Received: from vms173013pub.verizon.net ([206.46.173.13]:44705) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q5XCH-0006NP-6U for emacs-orgmode@gnu.org; Fri, 01 Apr 2011 01:47:01 -0400 Received: from alphaville.dokosmarshall.org ([unknown] [173.76.32.106]) by vms173013.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0LIY00MT6LDXWF10@vms173013.mailsrvcs.net> for emacs-orgmode@gnu.org; Fri, 01 Apr 2011 00:46:46 -0500 (CDT) In-reply-to: Message from "Sean O'Halpin" of "Fri\, 01 Apr 2011 03\:29\:02 BST." 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: Sean O'Halpin Cc: nicholas.dokos@hp.com, Org Mode , rpgoldman@sift.info Sean O'Halpin wrote: > 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 in= to > >> > code blocks in an Org-mode document. =C2=A0While it isn't perfect (e= specially > >> > if you make extensive use of noweb references or variables) there are > >> > mechanisms to maintain such a /sync/. =C2=A0To 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 br= ing > >> > the changes back into the Org-mode document. > >> > > >> > Improving the detangling (or "illiterate") features is an area ripe = for > >> > future Babel development. > >> > ...example elided... > >>=20 > >> 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 ':commen= ts yes' > on three sections and get only one link on output, so I can't see how this > would detangle properly. >=20 > Also, >=20 > # [[][main]] >=20 > is missing the file reference (in the first set of brackets), so it > won't work as a link. >=20 Yes, it does look unlikely. I don't know about the other comments (line numbers, etc.) but at least the link calculation in org-babel-tangle-collect-blocks is wrong I believe: it uses org-store-link to supposedly store a link to the current location on the global org-stored-links stack and then pops it, takes the car of it and sanitizes text properties of the result: that then becomes the link that should be stored in the tangled file. But it seems that org-store-link does not behave this way when called non-interactively: I get nothing on the global stack. Instead it seems to *return* the link as a string, which is then just thrown away. One can argue that org-store-link is wrong to behave this way[fn:1] but I will let Eric and Carsten fight it out :-) Nick Footnotes: [fn:1] assuming that it *does* behave this way and I am not fooling myself.