diff options
author | Kyle Meyer <kyle@kyleam.com> | 2015-05-06 23:02:41 -0400 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2015-05-06 23:02:41 -0400 |
commit | 33f0205b324b42f646e89b9e0565759a6ab270c3 (patch) | |
tree | 905b7c3c7d1098125c32e12d2c8f595656fa35aa | |
parent | a5f1a51e9615ebe0b3ed0ff0d4e0c1b233e50a41 (diff) | |
download | emacs.d-33f0205b324b42f646e89b9e0565759a6ab270c3.tar.gz |
Add command org-md-export-unfilled-buffer
The advantage of this over use km/export-wrapped-text with md buffer
is that it respects code blocks.
-rw-r--r-- | lisp/init-org.el | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lisp/init-org.el b/lisp/init-org.el index 18aabf2..f141adc 100644 --- a/lisp/init-org.el +++ b/lisp/init-org.el @@ -695,6 +695,10 @@ beginning of the link." ("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))) +(defvar km/org-md-fill-column fill-column + "Fill column for exported markdown. +This is a separate variable instead of `fill-column' to allow it +to be easily overriden.") (defun km/org-md--fill-string (contents) "Use `org-ascii--fill-string' to fill ox-md paragraphs." @@ -704,6 +708,11 @@ beginning of the link." (after 'ox-md (advice-add 'org-md-paragraph :filter-return #'km/org-md--fill-string)) +(defun km/org-md-export-unfilled-buffer () + (interactive) + (let ((km/org-md-fill-column (point-max))) + (org-md-export-as-markdown))) + ;;; Org Babel |