Add an icon before TODO state
This commit is contained in:
parent
6a1d1398a2
commit
13c036e82e
1 changed files with 10 additions and 2 deletions
12
scrumelo.el
12
scrumelo.el
|
@ -59,10 +59,18 @@
|
||||||
(org-entry-get (point) "Necessity")
|
(org-entry-get (point) "Necessity")
|
||||||
(nth 4 (org-heading-components))))
|
(nth 4 (org-heading-components))))
|
||||||
|
|
||||||
|
(defun scrumelo--task-state-class (state)
|
||||||
|
"Return the correct icon class for STATE."
|
||||||
|
(cdr (assoc state '(("TODO" . "icon-check-empty")
|
||||||
|
("DOING" . "icon-sign-blank")
|
||||||
|
("DONE" . "icon-check")))))
|
||||||
|
|
||||||
(defun scrumelo--story-row ()
|
(defun scrumelo--story-row ()
|
||||||
"Return a table row for the current org headline."
|
"Return a table row for the current org headline."
|
||||||
`(tr (td ,(org-entry-get (point) "TODO"))
|
(let ((state (org-entry-get (point) "TODO")))
|
||||||
(td ,(scrumelo--story))))
|
`(tr (td (i (@ (class ,(scrumelo--task-state-class state))) "")
|
||||||
|
" " ,state)
|
||||||
|
(td ,(scrumelo--story)))))
|
||||||
|
|
||||||
(defun scrumelo--maybe-story-row ()
|
(defun scrumelo--maybe-story-row ()
|
||||||
"If looking at a top level heading, return a table row for it."
|
"If looking at a top level heading, return a table row for it."
|
||||||
|
|
Loading…
Reference in a new issue