I have a bunch of random things that I'd like to export org stuff too
and it seemed to me that much of the work of writing code to export
stuff from org-mode into external documents could be conquered by simple
string specifiers.  So yesterday I hacked something together that is
actually working enough I should be able to use it to other random xml
formats, etc.  It's far from complete but it's usable by the average
elisp hacker.  See the todo list at the top for all the things it
*doesn't* do (sigh).

EG, the demo specifier in the example specifier list (see the code) can
be used to take this:

  Test

  * level 1
    text level 1
  *** level 2
      text level 2
  :  this
  :   is
  :    critical
  ***** level 3
        text [[file:foo2.org][level 3]]
  ***** Another 3
        more text level 3
  *** level 2 again
      more text level 2
  ******* jump to level 4
        level 4 text
  *** back to 2

To produce this:

  ====
  <h1>Test</h1>
  ====
  <date><br /><b>Date:</b> <i>2009-04-15 12:21:42 PDT</i><br />

  </date><tocname>
  __Table of Contents__
  </tocname>
  <toc>
  #(1)--level 1 --
      #(1.1)--level 2 --
          #(1.1.1)--level 3 --
          #(1.1.2)--Another 3 --
      #(1.2)--level 2 again --
      #(1.3)--back to 2 --
  #(2)--back to 1 --

  </toc>

  <secprefix>
  <h1>1 level 1 </h1>
  <p>
    text level 1</p>
  <secprefix>
  <h2>1.1 level 2 </h2>
  <p>
      text level 2<pre>
   this
  </pre>
  <pre>
    is
  </pre>
  <pre>
     critical
  </pre>
  </p>
  <secprefix>
  <h3>level 3 </h3>
  <p>
  ...



-- 
"In the bathtub of history the truth is harder to hold than the soap,
 and much more difficult to find."  -- Terry Pratchett

Attachment: org-generic.el
Description: application/emacs-lisp

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Reply via email to