diff options
author | Nicolas Goaziou <n.goaziou@gmail.com> | 2013-09-26 16:46:29 +0200 |
---|---|---|
committer | Nicolas Goaziou <n.goaziou@gmail.com> | 2013-09-26 16:50:10 +0200 |
commit | 28e33598e47f1648896e12036734c5e25ad08c13 (patch) | |
tree | 06530a57eb50bc922c58df1c35ac135a103922a6 | |
parent | aebacdac7ef8389c19d0ee079d7136e69095acbe (diff) | |
download | org-mode-28e33598e47f1648896e12036734c5e25ad08c13.tar.gz |
ox: Propagate property drawer changes to back-ends in contrib/
* contrib/lisp/ox-confluence.el (org-confluence-property-drawer): New
function.
* contrib/lisp/ox-groff.el (org-groff-node-property,
org-groff-property-drawer): New functions.
-rw-r--r-- | contrib/lisp/ox-confluence.el | 6 | ||||
-rw-r--r-- | contrib/lisp/ox-groff.el | 23 |
2 files changed, 28 insertions, 1 deletions
diff --git a/contrib/lisp/ox-confluence.el b/contrib/lisp/ox-confluence.el index 150d36c..f5bf247 100644 --- a/contrib/lisp/ox-confluence.el +++ b/contrib/lisp/ox-confluence.el @@ -46,6 +46,7 @@ (headline . org-confluence-headline) (italic . org-confluence-italic) (link . org-confluence-link) + (property-drawer . org-confluence-property-drawer) (section . org-confluence-section) (src-block . org-confluence-src-block) (strike-through . org-confluence-strike-through) @@ -93,6 +94,11 @@ (t raw-link)) "]"))) + +(defun org-confluence-property-drawer (property-drawer contents info) + (and (org-string-nw-p contents) + (format "\{\{%s\}\}" contents))) + (defun org-confluence-section (section contents info) contents) diff --git a/contrib/lisp/ox-groff.el b/contrib/lisp/ox-groff.el index 9a4fed1..245b67d 100644 --- a/contrib/lisp/ox-groff.el +++ b/contrib/lisp/ox-groff.el @@ -70,11 +70,12 @@ (keyword . org-groff-keyword) (line-break . org-groff-line-break) (link . org-groff-link) + (node-property . org-groff-node-property) (paragraph . org-groff-paragraph) (plain-list . org-groff-plain-list) (plain-text . org-groff-plain-text) (planning . org-groff-planning) - (property-drawer . (lambda (&rest args) "")) + (property-drawer . org-groff-property-drawer) (quote-block . org-groff-quote-block) (quote-section . org-groff-quote-section) (radio-target . org-groff-radio-target) @@ -1316,6 +1317,17 @@ INFO is a plist holding contextual information. See ;; No path, only description. Try to do something useful. (t (format org-groff-link-with-unknown-path-format desc))))) +;;; Node Property + +(defun org-groff-node-property (node-property contents info) + "Transcode a NODE-PROPERTY element from Org to Groff. +CONTENTS is nil. INFO is a plist holding contextual +information." + (format "%s:%s" + (org-element-property :key node-property) + (let ((value (org-element-property :value node-property))) + (if value (concat " " value) "")))) + ;;; Paragraph (defun org-groff-paragraph (paragraph contents info) @@ -1426,6 +1438,15 @@ information." "") "")) +;;;; Property Drawer + +(defun org-groff-property-drawer (property-drawer contents info) + "Transcode a PROPERTY-DRAWER element from Org to Groff. +CONTENTS holds the contents of the drawer. INFO is a plist +holding contextual information." + (and (org-string-nw-p contents) + (format "\\fC\n%s\\fP" contents))) + ;;; Quote Block (defun org-groff-quote-block (quote-block contents info) |