emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Oorg-export-generic.el and emphasize


From: Wes Hardaker
Subject: Re: [O] Oorg-export-generic.el and emphasize
Date: Fri, 14 Jun 2013 05:38:10 -0700
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.2 (gnu/linux)

Nicolas Goaziou <address@hidden> writes:

> "ox.el" is a generic exporter. I think we should focus on developing
> export back-ends for this one instead.
>
> What feature from `org-export-generic' do you think is missing in
> ox.el?

ox.el is a wonderfully designed parser and exporter (from what I've read
of code, not actually used it (yet)).  And my kudos to that and the
suite of exporters that go with it!

org-export-generic had an entirely different audience in mind, though:
the non-programmer.  It was designed so that you didn't have to write a
function to make it work, and thus was less sophisticated in what it
could do.  However, with very little effort you could get the output of
your choice by simply adding strings to a list and off you go.

EG, the configuration was simply a list:

  ; ...
     :body-section-header-prefix  ("<h1>" "<h2>" "<h3>"
                                   "<h4>" "<h5>" "<h6>")
     :body-section-header-format  "%s"
     :body-section-header-suffix  ("</h1>\n" "</h2>\n" "</h3>\n"
                                   "</h4>\n" "</h5>\n" "</h6>\n")

     :body-text-prefix "<p>\n"
     :body-text-suffix "</p>\n"
  ; ...

So the goal was simply to define a list of tags that would be placed
before and after a section.  This meant you couldn't do anything
complex, but it was very simple to get something running without having
to write a single defun.

ox.el is different, and much more powerful.  You have to write a defun
in order to get it to work, but the defuns are generally simple in themselves.


What I'd like to have done is either:

  1) Rewrite the generic exporter to make use of the ox backend (write a
  function for each export requirement that looks up the appropriate
  symbol in the above looking assoc array) 

  2) Add similar functionality to ox itself so you could set either a
     function or a string within the org-export-define-backend call.
     Then the exporter could simply test if it was a simple string or a
     symbol and react appropriately.
-- 
Wes Hardaker                                     
My Pictures:  http://capturedonearth.com/
My Thoughts:  http://pontifications.hardakers.net/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]