[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Illiterate programming question
From: |
Nick Dokos |
Subject: |
Re: [O] Illiterate programming question |
Date: |
Fri, 01 Apr 2011 01:46:45 -0400 |
Sean O'Halpin <address@hidden> wrote:
> On Thu, Mar 31, 2011 at 9:13 PM, Nick Dokos <address@hidden> wrote:
> > Sean O'Halpin <address@hidden> wrote:
> >
> >> On Wed, Mar 30, 2011 at 11:52 PM, Eric Schulte <address@hidden> 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.
> >> >
...example elided...
> >>
> >> 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.
>
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.
- Re: [O] Illiterate programming question,
Nick Dokos <=