Function: org-element-inlinetask-interpreter
org-element-inlinetask-interpreter is a byte-compiled function defined
in org-element.el.gz.
Signature
(org-element-inlinetask-interpreter INLINETASK CONTENTS)
Documentation
Interpret INLINETASK element as Org syntax.
CONTENTS is the contents of inlinetask.
Source Code
;; Defined in /usr/src/emacs/lisp/org/org-element.el.gz
(defun org-element-inlinetask-interpreter (inlinetask contents)
"Interpret INLINETASK element as Org syntax.
CONTENTS is the contents of inlinetask."
(let* ((level (org-element-property :level inlinetask))
(todo (org-element-property :todo-keyword inlinetask))
(priority (org-element-property :priority inlinetask))
(title (org-element-interpret-data
(org-element-property :title inlinetask)))
(tags (let ((tag-list (org-element-property :tags inlinetask)))
(and tag-list
(format ":%s:" (mapconcat 'identity tag-list ":")))))
(task (concat (make-string level ?*)
(and todo (concat " " todo))
(and priority (format " [#%c]" priority))
(and title (concat " " title)))))
(concat task
;; Align tags.
(when tags
(cond
((zerop org-tags-column) (format " %s" tags))
((< org-tags-column 0)
(concat
(make-string
(max (- (+ org-tags-column (length task) (length tags))) 1)
?\s)
tags))
(t
(concat
(make-string (max (- org-tags-column (length task)) 1) ?\s)
tags))))
;; Prefer degenerate inlinetasks when there are no
;; contents.
(when contents
(concat "\n"
contents
(make-string level ?*) " end")))))