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

This commit is contained in:
Jambunathan K 2012-12-14 19:05:29 +05:30 committed by Bastien Guerry
parent ef29557e6a
commit 6e3e0176e3
1 changed files with 18 additions and 9 deletions

View File

@ -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