emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] [PATCH 4/4] Add handling of blockquote and output formats that


From: Robert P. Goldman
Subject: [Orgmode] [PATCH 4/4] Add handling of blockquote and output formats that must be flowed.
Date: Wed, 28 Apr 2010 16:39:59 -0500

From: Robert P. Goldman <address@hidden>

Added a handler for blockquotes.

Also added :body-newline-paragraph to the org-set-generic-type.  This is
intended to help handling output formats (like tikiwiki) where newlines are
treated as paragraph separators, instead of being used to fill (i.e., the
destination is expected to do the word-wrapping).  If this is set to T then
org-export-generic will emit a newline character when it sees a blank
line.  This should be used in concert with a value like "%s " for
:body-line-format and nil for :body-line-wrap.
---
 contrib/lisp/org-export-generic.el |   19 +++++++++++++++++--
 1 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/contrib/lisp/org-export-generic.el 
b/contrib/lisp/org-export-generic.el
index 11c37da..1b099dd 100644
--- a/contrib/lisp/org-export-generic.el
+++ b/contrib/lisp/org-export-generic.el
@@ -88,8 +88,9 @@
 ;;   * properties
 ;;   * drawers
 ;;   * oh my
-;;   * optmization (many plist extracts should be in (let) vars
+;;   * optmization (many plist extracts should be in let vars)
 ;;   * define defcustom spec for the specifier list
+;;   * fonts:  at least monospace is not handled at all here.
 ;;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;
@@ -638,10 +639,14 @@ underlined headlines.  The default is 3."
          (or (plist-get export-plist :body-list-checkbox-done-end) ""))
         (listcheckhalfend
          (or (plist-get export-plist :body-list-checkbox-half-end) ""))
+         (bodynewline-paragraph   (plist-get export-plist 
:body-newline-paragraph))
         (bodytextpre   (plist-get export-plist :body-text-prefix))
         (bodytextsuf   (plist-get export-plist :body-text-suffix))
         (bodylinewrap  (plist-get export-plist :body-line-wrap))
         (bodylineform  (or (plist-get export-plist :body-line-format) "%s"))
+         (blockquotestart (or (plist-get export-plist :blockquote-start) 
"\n\n\t"))
+         (blockquoteend (or (plist-get export-plist :blockquote-end) "\n\n"))
+         
 
         thetoc toctags have-headings first-heading-pos
         table-open table-buffer link-buffer link desc desc0 rpl wrap)
@@ -868,7 +873,7 @@ underlined headlines.  The default is 3."
 
        ((string-match "^\\([ \t]*\\)\\(:\\( \\|$\\)\\)" line)
        ;;
-       ;; pre-formated text
+       ;; pre-formatted text
        ;;
        (setq line (replace-match "\\1" nil nil line))
 
@@ -933,6 +938,15 @@ underlined headlines.  The default is 3."
         )
 
        (insert (format numlistformat line)))
+
+       ((equal line "ORG-BLOCKQUOTE-START")
+        (setq line blockquotestart))
+       ((equal line "ORG-BLOCKQUOTE-END")
+        (setq line blockquoteend))
+       ((string-match "^\\s-*$" line)
+        ;; blank line
+        (if bodynewline-paragraph
+            (insert "\n")))
        (t
        ;;
        ;; body
@@ -1009,6 +1023,7 @@ underlined headlines.  The default is 3."
        (goto-char beg)))
     (goto-char (point-min))))
 
+
 (defun org-export-generic-format (export-plist prop &optional len n reverse)
   "converts a property specification to a string given types of properties
 
-- 
1.6.5.3





reply via email to

[Prev in Thread] Current Thread [Next in Thread]