Prechádzať zdrojové kódy

Merge branch 'master' of orgmode.org:org-mode

Bastien Guerry 11 rokov pred
rodič
commit
33adedda0b
3 zmenil súbory, kde vykonal 35 pridanie a 5 odobranie
  1. 6 0
      contrib/lisp/ox-confluence.el
  2. 22 1
      contrib/lisp/ox-groff.el
  3. 7 4
      doc/org.texi

+ 6 - 0
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)
 

+ 22 - 1
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)

+ 7 - 4
doc/org.texi

@@ -1851,7 +1851,8 @@ Sometimes you want to keep information associated with an entry, but you
 normally don't want to see it.  For this, Org mode has @emph{drawers}.
 Drawers need to be configured with the option @code{org-drawers}@footnote{You
 can define additional drawers on a per-file basis with a line like
-@code{#+DRAWERS: HIDDEN STATE}}.  Drawers look like this:
+@code{#+DRAWERS: HIDDEN STATE}}.  They can contain anything but a headline
+and another drawer.  Drawers look like this:
 
 @example
 ** This is a headline
@@ -1876,7 +1877,8 @@ press @key{TAB} there.  Org mode uses the @code{PROPERTIES} drawer for
 storing properties (@pxref{Properties and Columns}), and you can also arrange
 for state change notes (@pxref{Tracking TODO state changes}) and clock times
 (@pxref{Clocking work time}) to be stored in a drawer @code{LOGBOOK}.  If you
-want to store a quick note in the LOGBOOK drawer, in a similar way to state changes, use
+want to store a quick note in the LOGBOOK drawer, in a similar way to state
+changes, use
 
 @table @kbd
 @kindex C-c C-z
@@ -1885,10 +1887,11 @@ Add a time-stamped note to the LOGBOOK drawer.
 @end table
 
 @vindex org-export-with-drawers
+@vindex org-export-with-properties
 You can select the name of the drawers which should be exported with
 @code{org-export-with-drawers}.  In that case, drawer contents will appear in
-export output.  Property drawers are not affected by this variable and are
-never exported.
+export output.  Property drawers are not affected by this variable: configure
+@code{org-export-with-properties} instead.
 
 @node Blocks, Footnotes, Drawers, Document Structure
 @section Blocks