From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jambunathan K Subject: Re: Markdown export (using org-export-generic) Date: Thu, 18 Aug 2011 03:56:27 +0530 Message-ID: <818vqrr7xo.fsf@gmail.com> References: <811uwkzrre.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:39528) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QtoZu-00020z-TO for emacs-orgmode@gnu.org; Wed, 17 Aug 2011 18:27:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QtoZt-00033R-CV for emacs-orgmode@gnu.org; Wed, 17 Aug 2011 18:27:14 -0400 Received: from mail-pz0-f44.google.com ([209.85.210.44]:57068) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QtoZt-00033L-5n for emacs-orgmode@gnu.org; Wed, 17 Aug 2011 18:27:13 -0400 Received: by pzk36 with SMTP id 36so2164568pzk.17 for ; Wed, 17 Aug 2011 15:27:12 -0700 (PDT) In-Reply-To: (Paul Sexton's message of "Wed, 17 Aug 2011 21:16:16 +0000 (UTC)") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Paul Sexton Cc: emacs-orgmode@gnu.org Paul Sexton writes: > Jambunathan K gmail.com> writes: >> May be you could cook something up with org-lparse? The file is in >> contrib dir and org-xhtml and ord-odt make use of it. > > Thanks, it looks interesting, but I can't find any documentation? You need to rely on the docstrings for the most part. Please take a look at the initial commentary section of org-lparse.el. The docstring for org-lparse-native-backends should a good starting point [1]. You will start with adding an entry to this variable and start exporting with M-x org-lparse. Another way to proceed is - Start with a sample org file [2] - Enable debug logs in the exported file (setq org-lparse-debug t) - Do a org-export-as-xhtml - Open the resulting html file and take a Look at the comments embedded in it. You will have a feel for how the format and entity callbacks are invoked (See docstring below for the format and entity callbacks) - Keep modifying org-xhtml.el until it becomes a org-markdown.el org-lparse is reasonably mature and you are less likely to burn your fingers badly with it. Jambunathan K. Footnotes: [1] org-lparse-native-backends ,----[ C-h v org-lparse-native-backends RET ] | org-lparse-native-backends is a variable defined in `org-lparse.el'. | Its value is ("odt" "xhtml") | | | Documentation: | List of native backends registered with `org-lparse'. | A backend can use `org-lparse-register-backend' to add itself to | this list. | | All native backends must implement a get routine and a mandatory | set of callback routines. | | The get routine must be named as org--get where backend | is the name of the backend. The exporter uses `org-lparse-get' | and retrieves the backend-specific callback by querying for | ENTITY-CONTROL and ENTITY-FORMAT variables. | | For the sake of illustration, the html backend implements | `org-xhtml-get'. It returns | `org-xhtml-entity-control-callbacks-alist' and | `org-xhtml-entity-format-callbacks-alist' as the values of | ENTITY-CONTROL and ENTITY-FORMAT settings. | | [back] `---- [2] Download the test.org file in the link below http://repo.or.cz/w/org-mode/org-jambu.git/blob_plain/HEAD:/contrib/odt/tests/ This is the unit test file that I used for developing the exporter. It is a GOOD starting point and should give reasonably a COMPREHENSIVE coverage. --