Wes Hardaker's org-mode Hacks

Wes Hardaker's org-mode hacks

Table of Contents

export-generic

I needed the ability to convert org-mode files to some strange other forms. EG, I frequently type of long email answers or take meeting notes in org-mode. But I didn't like the output exactly. Or I wanted to use org-mode to help write long wikipedia entries. Or a presentation that could be written out as magicpoint or beamer…

So I started a quick project to make org-mode be able to export to things more generically. IE, you should be able to say 'ok, go ahead and export this whole blob; please prefix a header with '=' and a list item with '<item>' and …

So org-export-as-generic was born. It's currently a patch to org-mode itself to create the new export prompt entry as well as create the new export mode itself.

There is a lot left to do (like handling bold and italics, now that I think of it). But it is functional.

Patch: org-generic.patch

Usage:

See the org-generic-alist variable definition for the fully glory details of what you can do. In particular, check out the "demo" definition which tries to do, well, everything.

In your own .el initialization files you should also be able to assign a new "really-basic-text" type, for example, using something like this:

     (org-set-generic-type
      "really-basic-text" 
      '(:file-suffix
        ".txt"
 
        :title-format "=== %s ===\n"
        :body-header-section-numbers t
        :body-header-section-number-format "%s) "
        :body-section-header-prefix  "\n"
        :body-section-header-suffix "\n"
        :body-line-format "  %s\n"
        :body-line-wrap   75
        ))

And set the org-generic-export-type using:

     (setq org-generic-export-type "really-basic-text")

After which hitting *Ctrl-c Ctrl-e g ' '* should export it to your new defined type.

Date: 2009-06-12 17:08:13 PDT

HTML generated by org-mode 6.27trans in emacs 21