[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Illiterate programming question
From: |
Eric Schulte |
Subject: |
Re: [O] Illiterate programming question |
Date: |
Wed, 30 Mar 2011 16:52:40 -0600 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Robert Goldman <address@hidden> writes:
> On 3/30/11 Mar 30 -4:33 PM, Nick Dokos wrote:
>> Robert Goldman <address@hidden> wrote:
>>
>>> I would like to do the opposite of literate programming (hence the
>>> subject line!):
>>>
>>> I would like to pull into my org file snippets from a code file. I know
>>> that org-mode will let me import /entire/ source code files. Is there
>>> some way to say "Import the region of this file between these two
>>> delimiters?"
>>>
>>> If not, do you think it would be hard to add this feature? I already
>>> have the snappy name, after all!
>>>
>>
>> I don't really understand: can't you cut and paste?
>
> Yes, but if I cut and paste the text of the code that I am describing
> may change out from under my text. If I import the code, it stays in
> sync (at least when the document is exported).
>
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
- [O] Illiterate programming question, Robert Goldman, 2011/03/30
- Re: [O] Illiterate programming question, Nick Dokos, 2011/03/30
- Re: [O] Illiterate programming question, Erik Iverson, 2011/03/30
- Re: [O] Illiterate programming question, Robert Goldman, 2011/03/30
- Re: Re: [O] Illiterate programming question, chris . m . malone, 2011/03/30
- [O] Re: Illiterate programming question, Sébastien Vauban, 2011/03/30
- Re: [O] Illiterate programming question,
Eric Schulte <=
- Re: [O] Illiterate programming question, Sean O'Halpin, 2011/03/31
- Re: [O] Illiterate programming question, Nick Dokos, 2011/03/31
- Re: [O] Illiterate programming question, Sean O'Halpin, 2011/03/31