Browse Source

Add macro to insert property values into exported text

Example:

{{{property(id)}}}

Will insert the ID property of current subtree if the Org buffer is
exported.

* lisp/org-exp.el (org-infile-export-plist): Define property macro

TINYCHANGE
David Maus 14 years ago
parent
commit
d78eba7efb
1 changed files with 1 additions and 0 deletions
  1. 1 0
      lisp/org-exp.el

+ 1 - 0
lisp/org-exp.el

@@ -770,6 +770,7 @@ modified) list.")
 	;; Add macro definitions
 	(setq p (plist-put p :macro-date "(eval (format-time-string \"$1\"))"))
 	(setq p (plist-put p :macro-time "(eval (format-time-string \"$1\"))"))
+	(setq p (plist-put p :macro-property "(eval (org-entry-get nil \"$1\" 'selective))"))
 	(setq p (plist-put
 		 p :macro-modification-time
 		 (and (buffer-file-name)