emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Illiterate programming question


From: Sean O'Halpin
Subject: Re: [O] Illiterate programming question
Date: Fri, 1 Apr 2011 03:29:02 +0100

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.
>> >
>> > 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
>>        <<body>>
>>      end
>>    #+end_src
>>
>>    #+source: main
>>    #+begin_src ruby :comments yes :tangle detangle.rb :noweb yes
>>      <<method>>
>>      hello
>>    #+end_src
>>
>> and got the output:
>>
>>    # [[][main]]
>>
>>    def hello
>>      puts "hello"
>>    end
>>    hello
>>
>>    # 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]