all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Markdown export (using org-export-generic)
@ 2011-08-17  2:20 Paul Sexton
  2011-08-17  2:38 ` Jambunathan K
  0 siblings, 1 reply; 5+ messages in thread
From: Paul Sexton @ 2011-08-17  2:20 UTC (permalink / raw)
  To: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-08-17 22:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-17  2:20 Markdown export (using org-export-generic) Paul Sexton
2011-08-17  2:38 ` Jambunathan K
2011-08-17 21:16   ` Paul Sexton
2011-08-17 22:26     ` Jambunathan K
2011-08-17 22:49       ` Jambunathan K

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.