emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Robert P. Goldman" <rpgoldman@sift.info>
To: emacs-orgmode@gnu.org
Cc: "Robert P. Goldman" <rpgoldman@real-time.com>, dominik@uva.nl
Subject: [PATCH 4/4] Add handling of blockquote and output formats that must be flowed.
Date: Wed, 28 Apr 2010 16:39:59 -0500	[thread overview]
Message-ID: <1272490799-22448-2-git-send-email-rpgoldman@sift.info> (raw)
In-Reply-To: <1272490799-22448-1-git-send-email-rpgoldman@sift.info>

From: Robert P. Goldman <rpgoldman@real-time.com>

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	other threads:[~2010-04-28 21:40 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-28 21:39 org-export-generic patch Robert P. Goldman
2010-04-28 21:39 ` Robert P. Goldman [this message]
2010-04-29 13:54   ` Orgmode[PATCH 4/4] Add handling of blockquote and output formats that must be flowed Wes Hardaker
2010-04-29 13:58     ` Carsten Dominik
2010-04-29 15:05       ` Robert Goldman
2010-04-29 17:00         ` Bernt Hansen
2010-04-29 17:25           ` Robert Goldman
2010-04-29 18:08             ` Bernt Hansen
2010-04-29 15:00     ` Robert Goldman
2010-04-30 14:51       ` Wes Hardaker
2010-04-30 15:15         ` Robert Goldman
2010-04-30 15:28           ` Carsten Dominik
2010-04-30 15:45             ` Robert Goldman
2010-04-29 10:44 ` org-export-generic patch Carsten Dominik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1272490799-22448-2-git-send-email-rpgoldman@sift.info \
    --to=rpgoldman@sift.info \
    --cc=dominik@uva.nl \
    --cc=emacs-orgmode@gnu.org \
    --cc=rpgoldman@real-time.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).