all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nick Dokos <nicholas.dokos@hp.com>
To: Sean O'Halpin <sean.ohalpin@gmail.com>
Cc: nicholas.dokos@hp.com, Org Mode <emacs-orgmode@gnu.org>,
	rpgoldman@sift.info
Subject: Re: Illiterate programming question
Date: Fri, 01 Apr 2011 01:46:45 -0400	[thread overview]
Message-ID: <5975.1301636805@alphaville.dokosmarshall.org> (raw)
In-Reply-To: Message from "Sean O'Halpin" <sean.ohalpin@gmail.com> of "Fri\, 01 Apr 2011 03\:29\:02 BST." <AANLkTikmepDw4Lv-sxaxrLoVkUz5CsE6hhxfStG2yi4R@mail.gmail.com>

Sean O'Halpin <sean.ohalpin@gmail.com> wrote:

> On Thu, Mar 31, 2011 at 9:13 PM, Nick Dokos <nicholas.dokos@hp.com> wrote:
> > Sean O'Halpin <sean.ohalpin@gmail.com> wrote:
> >
> >> On Wed, Mar 30, 2011 at 11:52 PM, Eric Schulte <schulte.eric@gmail.com> 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.

  reply	other threads:[~2011-04-01  5:47 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-30 20:32 Illiterate programming question Robert Goldman
2011-03-30 21:33 ` Nick Dokos
2011-03-30 21:39   ` Erik Iverson
2011-03-30 21:44   ` Robert Goldman
2011-03-30 22:38     ` chris.m.malone
2011-03-30 22:45     ` Sébastien Vauban
2011-03-30 22:52     ` Eric Schulte
2011-03-31 20:09       ` Sean O'Halpin
2011-03-31 20:13         ` Nick Dokos
2011-04-01  2:29           ` Sean O'Halpin
2011-04-01  5:46             ` Nick Dokos [this message]
2011-04-01 16:41               ` Eric Schulte
2011-04-01 21:11                 ` Sébastien Vauban

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5975.1301636805@alphaville.dokosmarshall.org \
    --to=nicholas.dokos@hp.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=rpgoldman@sift.info \
    --cc=sean.ohalpin@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.