From mboxrd@z Thu Jan 1 00:00:00 1970 From: Baoqiu Cui Subject: Re: DocBook exporter code (version 1.0) Date: Sun, 08 Mar 2009 21:46:26 -0700 Message-ID: References: <52A4D4D6-E4BB-4ACF-9438-EB69E71ABEA8@uva.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LgXO6-0001T4-GF for emacs-orgmode@gnu.org; Mon, 09 Mar 2009 00:46:50 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LgXO3-0001Sj-Nb for emacs-orgmode@gnu.org; Mon, 09 Mar 2009 00:46:50 -0400 Received: from [199.232.76.173] (port=38097 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LgXO3-0001Sd-Ej for emacs-orgmode@gnu.org; Mon, 09 Mar 2009 00:46:47 -0400 Received: from main.gmane.org ([80.91.229.2]:51799 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LgXO2-0004Xv-Jq for emacs-orgmode@gnu.org; Mon, 09 Mar 2009 00:46:47 -0400 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LgXNw-0006aZ-I4 for emacs-orgmode@gnu.org; Mon, 09 Mar 2009 04:46:40 +0000 Received: from wifi-nat.seoul.corp.yahoo.com ([202.47.143.2]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 09 Mar 2009 04:46:40 +0000 Received: from cbaoqiu by wifi-nat.seoul.corp.yahoo.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 09 Mar 2009 04:46:40 +0000 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hi Carsten, Carsten Dominik writes: > Hi Baoqui, > > thanks for the link to the code. > > Forgive me for so far staying quiet on this subject. When you > first posted the announcement, I had some mixed feelings. No problem at all. This is totally understandable. > First of all, I don't really know docbook, and I have never used it. > > Then: > > One of the really weak features in Org's design is that exporting is not > implemented in a generic way. All exporters share a preprocessing step > that turns Org format into something a little more sane and consistent. > Then each exporter goes its own way. This setup makes maintenance > sort of a nightmare, because each change to Org syntax needs to be > implemented in all exporters separately. ... Yes, it would be nice to have a generic exporting framework in Org. When I just started working on the DocBook exporter, I tried to follow org-export-latex.el first but hit some limitation in org-list-to-generic after a short time. Then I switched to the style of org-export-as-html, and found its line-based exporting very easy to use. > ... Maybe you have read my > swearing when I was trying to fix the LaTeX exporter which I did > not understand completely at first - it was written by Bastien. I haven't read about this, but I can imagine what kind of difficulty you might have... > I had really hoped that the next step in exporting Org would be > to rewrite the exporter from scratch, in a generic way, that will > then make supporting different formatters more stable and easy. > Adding a new exporter does not get us closer to that idea. Agreed. If Org documents can be parsed into tree representations by the generic exporter, and each individual exporter only needs to configure the tags (or formatting methods) for all components in the tree, writing different exporters would be much easier. Not sure if this can be easily done in Org. > And I had feared that your exporter would be a badly hacked > attempt reinventing lots of wheels, that could never become a really > complete export. > > I have misjudged severely, the exporter you made looks quite complete, > you have based it very heavily on the XHTML exporter and in this way > it seems to be able to handle the entire Org syntax, if I see > correctly. ... Yes, DocBook exporter is heavily based on the XHTML exporter. Both exporters shares a lot of processing, but differ at other areas. Some internal functions used by these two exporters could be merged in the future. > ... So I have now made the changes you require in org-exp.el, > and I would like to include the exporter, once you are satisfied, > into our contrib directory or even, depending on copyright assignment, > into the core. Thanks a lot for making the changes in org-exp.el! I've removed the modified version of org-exp.el from my repository on Google Code. I'll try to do more testing (including testing it on XEmacs) and incorporate any comments that other people may have before you can put this exporter into Org release. > However, I need to make clear that I have no time to maintain another > exporter, so I would hope that you would be willing to to the necessary > work to keep it up to date and working. I won't have any problem with maintaining this exporter. Thanks, Baoqiu > Best wishes > > - Carsten > > On Mar 8, 2009, at 6:10 AM, Baoqiu Cui wrote: > >> Hi, >> >> I just posted the code for DocBook exporter to Google Code. You can >> use >> the following link to get access to the code and example files: >> >> http://code.google.com/p/bcui-emacs/source/browse/#svn/trunk/org- >> docbook >> >> Here is the README: >> = = >> ====================================================================== >> # >> # File: org-docbook/README >> # >> # $Id$ >> # >> >> This is the DocBook exporter for Org-mode, a tool written in Emacs >> Lisp >> to export text files written in Org-mode to DocBook. >> >> This directory contains: >> >> README >> This file. >> >> org-export-docbook.el >> The main part of DocBook exporter code. >> >> org-exp.el >> Slightly modified version of file org-exp.el that is part of >> Org-mode. Currently this file is synced up with Org-mode 6.24. >> >> test.org >> An Org file used for testing. It includes all the features that >> current version of DocBook exporter supports. >> >> test.xml >> DocBook XML file exported from test.org. >> >> test.pdf >> PDF file generated from DocBook XML file test.xml. >> >> If you have any comments on how to improve this exporter, please send >> email to cbaoqiu AT yahoo DOT com. >> >> = = >> ====================================================================== >> >> You are welcome to try this out, and give me any comments you may >> have. >> Bug reports and ideas on how to improve this will be highly >> appreciated. >> >> Thanks, >> Baoqiu