[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] Markdown export (using org-export-generic)
From: |
Paul Sexton |
Subject: |
[O] Markdown export (using org-export-generic) |
Date: |
Wed, 17 Aug 2011 02:20:36 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
Wes Hardaker's org-export-generic (in worg) does a pretty good job of
exporting to markdown syntax. The following works (use C-c C-e g to
run the exporter):
(require 'org-export-generic)
(org-set-generic-type
"markdown"
'(:file-suffix ".markdown"
:key-binding ?M
:title-format "Title: %s\n"
:date-format "Date: %s\n"
:toc-export nil
:author-export t
:tags-export nil
:drawers-export nil
:date-export t
:timestamps-export t
:priorities-export nil
:todo-keywords-export t
:body-line-fixed-format "\t%s\n"
;:body-list-prefix "\n"
:body-list-format "- %s"
:body-list-suffix "\n"
:header-prefix ("" "" "### " "#### " "##### " "###### ")
:body-section-header-prefix ("" "" "### " "#### " "##### " "###### ")
:body-section-header-format "%s\n"
:body-section-header-suffix (?= ?- "")
:body-header-section-numbers nil
:body-header-section-number-format "%s) "
:body-line-format "%s\n"
:body-newline-paragraph "\n"
:bold-format "**%s**"
:italic-format "_%s_"
:verbatim-format "`%s`"
:code-format "`%s`"
:body-line-wrap 75
))
There are some defects however, which an't really be fixed without altering
the exporter code. The main ones are:
1. Nested lists don't seem to be supported.
2. Tables come out as:
col 1 col 2
-------+-------
1 2
3 4
But need to look like this:
|col 1 | col 2 |
|-------|-------|
| 1 | 2|
| 3 | 4|
3. Links are not exported correctly.
A link [[http://www.google.com][like this]] comes out as
A link [like this]
...
[like this]: http://www.google.com
But need to look either like:
A link [like this][1]
...
[1]: http://www.google.com
Or like:
A link [like this](http://www.google.com)
Paul
- [O] Markdown export (using org-export-generic),
Paul Sexton <=