浏览代码

EXPORT: Additional properties for setting export options

Matt Lundin writes:

>  If it's not too much trouble, I was wondering if I could
>  request the following properties to set export options for
>  subtrees:
>
>  EXPORT_AUTHOR
>  EXPORT_DATE
>
>  In addition to specifying an EXPORT_FILE and EXPORT_TITLE
>  for a subtree, I often find myself wanting to change the
>  date and author lines.
Carsten Dominik 16 年之前
父节点
当前提交
0394a77f8b
共有 3 个文件被更改,包括 12 次插入1 次删除
  1. 6 0
      lisp/ChangeLog
  2. 4 0
      lisp/org-exp.el
  3. 2 1
      lisp/org.el

+ 6 - 0
lisp/ChangeLog

@@ -1,5 +1,11 @@
 2009-04-18  Carsten Dominik  <carsten.dominik@gmail.com>
 2009-04-18  Carsten Dominik  <carsten.dominik@gmail.com>
 
 
+	* org.el (org-default-properties): New default properteis for
+	completion.
+
+	* org-exp.el (org-export-add-subtree-options): Add new properties
+	for subtree export.
+
 	* org-docbook.el (org-export-docbook-keywords-markup)
 	* org-docbook.el (org-export-docbook-keywords-markup)
 	(org-export-docbook-timestamp-markup): New options.
 	(org-export-docbook-timestamp-markup): New options.
 	(org-export-docbook-protect-tags): New function.
 	(org-export-docbook-protect-tags): New function.

+ 4 - 0
lisp/org-exp.el

@@ -710,6 +710,10 @@ modified) list.")
 	;;   (setq p (plist-put p :title a)))
 	;;   (setq p (plist-put p :title a)))
 	(when (setq a (org-entry-get pos "EXPORT_TEXT"))
 	(when (setq a (org-entry-get pos "EXPORT_TEXT"))
 	  (setq p (plist-put p :text a)))
 	  (setq p (plist-put p :text a)))
+	(when (setq a (org-entry-get pos "EXPORT_AUTHOR"))
+	  (setq p (plist-put p :author a)))
+	(when (setq a (org-entry-get pos "EXPORT_DATE"))
+	  (setq p (plist-put p :date a)))
 	(when (setq a (org-entry-get pos "EXPORT_OPTIONS"))
 	(when (setq a (org-entry-get pos "EXPORT_OPTIONS"))
 	  (setq p (org-export-add-options-to-plist p a)))))
 	  (setq p (org-export-add-options-to-plist p a)))))
     p))
     p))

+ 2 - 1
lisp/org.el

@@ -11139,7 +11139,8 @@ but in some other way.")
   '("ARCHIVE" "CATEGORY" "SUMMARY" "DESCRIPTION" "CUSTOM_LINK"
   '("ARCHIVE" "CATEGORY" "SUMMARY" "DESCRIPTION" "CUSTOM_LINK"
     "LOCATION" "LOGGING" "COLUMNS" "VISIBILITY"
     "LOCATION" "LOGGING" "COLUMNS" "VISIBILITY"
     "TABLE_EXPORT_FORMAT" "TABLE_EXPORT_FILE"
     "TABLE_EXPORT_FORMAT" "TABLE_EXPORT_FILE"
-    "EXPORT_FILE_NAME" "EXPORT_TITLE" "ORDERED")
+    "EXPORT_FILE_NAME" "EXPORT_TITLE" "EXPORT_AUTHOR" "EXPORT_DATE"
+    "ORDERED")
   "Some properties that are used by Org-mode for various purposes.
   "Some properties that are used by Org-mode for various purposes.
 Being in this list makes sure that they are offered for completion.")
 Being in this list makes sure that they are offered for completion.")