emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Sean O'Halpin" <sean.ohalpin@gmail.com>
To: Eric Schulte <schulte.eric@gmail.com>
Cc: nicholas.dokos@hp.com, Org Mode <emacs-orgmode@gnu.org>,
	rpgoldman@sift.info
Subject: Re: Illiterate programming question
Date: Thu, 31 Mar 2011 21:09:18 +0100	[thread overview]
Message-ID: <AANLkTimHAjP6W_=P1xDRZdvVCf-rdHCBrYbAq6Wr5ZrW@mail.gmail.com> (raw)
In-Reply-To: <87mxkcrzk7.fsf@gmail.com>

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.
>
> 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.

Regards,
Sean

  reply	other threads:[~2011-03-31 20:09 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 [this message]
2011-03-31 20:13         ` Nick Dokos
2011-04-01  2:29           ` Sean O'Halpin
2011-04-01  5:46             ` Nick Dokos
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

  List information: https://www.orgmode.org/

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

  git send-email \
    --in-reply-to='AANLkTimHAjP6W_=P1xDRZdvVCf-rdHCBrYbAq6Wr5ZrW@mail.gmail.com' \
    --to=sean.ohalpin@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=nicholas.dokos@hp.com \
    --cc=rpgoldman@sift.info \
    --cc=schulte.eric@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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).