emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Wes Hardaker <wjhns209@hardakers.net>
To: Nicolas Goaziou <n.goaziou@gmail.com>
Cc: celano <celano@laposte.net>,
	"emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: Oorg-export-generic.el and emphasize
Date: Fri, 14 Jun 2013 05:38:10 -0700	[thread overview]
Message-ID: <0ly5acoojx.fsf@wjh.hardakers.net> (raw)
In-Reply-To: <87vc5qw4uu.fsf@gmail.com> (Nicolas Goaziou's message of "Fri, 07 Jun 2013 13:13:45 +0200")

Nicolas Goaziou <n.goaziou@gmail.com> 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	other threads:[~2013-06-14 12:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-06  6:24 org-export-generic.el and emphasize celano
2013-06-06 14:14 ` Oorg-export-generic.el " Wes Hardaker
2013-06-07 11:13   ` Nicolas Goaziou
2013-06-14 12:38     ` Wes Hardaker [this message]
2013-06-27 15:30       ` Bastien
2013-07-01 15:22         ` Wes Hardaker

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=0ly5acoojx.fsf@wjh.hardakers.net \
    --to=wjhns209@hardakers.net \
    --cc=celano@laposte.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=n.goaziou@gmail.com \
    /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).