浏览代码

org-e-odt.el: Emit priority in headlines, right justify tags

Jambunathan K 12 年之前
父节点
当前提交
6e3e0176e3
共有 1 个文件被更改,包括 18 次插入9 次删除
  1. 18 9
      contrib/lisp/org-e-odt.el

+ 18 - 9
contrib/lisp/org-e-odt.el

@@ -1715,18 +1715,27 @@ CONTENTS is nil.  INFO is a plist holding contextual information."
 	  &key level section-number headline-label &allow-other-keys)
   (concat
    ;; Todo.
-   (and todo
-	(concat
-	 (let ((style (if (member todo org-done-keywords) "OrgDone" "OrgTodo")))
-	   (format "<text:span text:style-name=\"%s\">%s</text:span>"
-		   style todo)) " "))
+   (when todo
+     (let ((style (if (member todo org-done-keywords) "OrgDone" "OrgTodo")))
+       (format "<text:span text:style-name=\"%s\">%s</text:span> "
+	       style todo)))
+   (when priority
+     (let* ((priority (format "[#%c]" priority))
+	    (style (format "OrgPriority-%s" priority)))
+       (format "<text:span text:style-name=\"%s\">%s</text:span> "
+	       style priority)))
    ;; Title.
    text
    ;; Tags.
-   (and tags
-	(concat "<text:tab/>"
-		(format "<text:span text:style-name=\"%s\">%s</text:span>"
-			"OrgTag" (mapconcat 'org-trim tags " : "))))))
+   (when tags
+     (concat
+      "<text:tab/>"
+      (format "<text:span text:style-name=\"%s\">[%s]</text:span>"
+	      "OrgTags" (mapconcat
+			 (lambda (tag)
+			   (format
+			    "<text:span text:style-name=\"%s\">%s</text:span>"
+			    "OrgTag" tag)) tags " : "))))))
 
 (defun org-e-odt-format-headline--wrap (headline info
 						 &optional format-function