emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric Schulte <eric.schulte@gmx.com>
To: Ilya Shlyakhter <ilya_shl@alum.mit.edu>
Cc: emacs-orgmode@gnu.org
Subject: Re: org-babel tangling + ascii export
Date: Mon, 26 Mar 2012 09:10:11 -0400	[thread overview]
Message-ID: <874ntb4ifg.fsf@gmx.com> (raw)
In-Reply-To: <CACfYvRbbhG6Wq56FNswibvB_wV8aGpvfcmM+vgWawew0PRrd=g@mail.gmail.com> (Ilya Shlyakhter's message of "Mon, 26 Mar 2012 10:58:53 -0400")

[-- Attachment #1: Type: text/plain, Size: 984 bytes --]

Ilya Shlyakhter <ilya_shl@alum.mit.edu> writes:

>>Yes this is possible, see the "org" argument to the "comment" header
> argument http://orgmode.org/manual/comments.html.
>
> Right, I saw that, but it has the following limitation:
>
>>The text is picked from the leading context of the tangled code and is
> limited by the nearest headline or source block as the case may be.
>
> I want all text from the Org file included, not just "leading context up to
> nearest headline".

The above text means "per code block", so the entire file is exported.

> I also want the hierarchical structure of the included text preserved,
> as done by ASCII export.

Please try to tangle the attached file, I believe it is what you want.

> (E.g. I want to include high-level documentation and description, as
> goes at the top of an elisp file, and which can be broken into
> sections/subsections/etc -- not just local documentation before a
> given code block).  Is that possible?
>

Yes.

Best,


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: something.org --]
[-- Type: text/x-org, Size: 356 bytes --]

#+Property: comments both
#+Property: tangle example.el

This is a the top of an Org-mode file.

* Headline 1
This is content inside of a headline.
| 1 |
| 2 |
| 3 |
| 4 |

#+begin_src emacs-lisp
  (message "code block 1")
#+end_src

* Headline 2
This is content inside of a secondary headline.

#+begin_src emacs-lisp
  (message "code block 1")
#+end_src

[-- Attachment #3: Type: text/plain, Size: 995 bytes --]


>
> thanks,
>
> ilya
>
>
> On Mon, Mar 26, 2012 at 7:22 AM, Eric Schulte <eric.schulte@gmx.com> wrote:
>
>> Yes this is possible, see the "org" argument to the "comment" header
>> argument http://orgmode.org/manual/comments.html.
>>
>> Cheers,
>>
>> Ilya Shlyakhter <ilya_shl@alum.mit.edu> writes:
>>
>> > Is it possible to combine org-babel tangling with ASCII export, so that
>> > the tangled file would have ALL of the Org-file's content
>> > as comments (preserving indentation etc as the ASCII export does),
>> > with the code blocks inserted as non-comments?
>> >
>> > Basically I want to write the program in literate-programming form in
>> > Org mode, but be able to export it into an executable form that's
>> > independent of Org but still has all the information (not just the
>> > text immediately before each code block).
>> >
>> > Thanks for help,
>> >
>> > ilya
>> >
>> >
>>
>> --
>> Eric Schulte
>> http://cs.unm.edu/~eschulte/
>>

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/

  reply	other threads:[~2012-03-26 15:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-22 21:14 org-babel tangling + ascii export Ilya Shlyakhter
2012-03-26 11:22 ` Eric Schulte
2012-03-26 14:58   ` Ilya Shlyakhter
2012-03-26 13:10     ` Eric Schulte [this message]
2012-03-26 15:57       ` Ilya Shlyakhter

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=874ntb4ifg.fsf@gmx.com \
    --to=eric.schulte@gmx.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=ilya_shl@alum.mit.edu \
    /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).