emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Michael Baum <maabaum@gmail.com>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Need help with processing a text block with python function
Date: Tue, 1 Jan 2013 11:13:27 -0500	[thread overview]
Message-ID: <CA+G3xFhN28YmhVmMufoD6RAaanwo2eRdAJVdUDh5SWWLJNOe7A@mail.gmail.com> (raw)

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

I know this is kind of an org-mode 101 question, sorry, but after searching
docs for a couple of days, I could use a pointer. I want to write a
function in a code block in python or perl that steps through lines of text
and does some complicated reformatting, adding in html bits and such, for a
specialized application. Then I want to be able paste a block of text into
an org-mode file and call this function to walk through it and do it's
stuff, sending the result to an export buffer.

What's the best way to do that, specifically, what should I do with the
text to be processed? Put it all under a single headline and call the
function against that headline? Put it within some sort of begin/end
markers? I need the python or whatever script to be able to step through
one line at a time maybe using it's usual text input functions.

Thanks,
maab

-- 
====================================
Michael Baum <maabaum@gmail.com>

You should never have your best trousers on when you go out
 to fight for freedom and truth. - Ibsen

[-- Attachment #2: Type: text/html, Size: 1129 bytes --]

                 reply	other threads:[~2013-01-01 16:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=CA+G3xFhN28YmhVmMufoD6RAaanwo2eRdAJVdUDh5SWWLJNOe7A@mail.gmail.com \
    --to=maabaum@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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).