Integrate due date into task overview

This commit is contained in:
Patrick Winter 2019-11-07 19:24:55 +01:00
parent 2a74bc57af
commit 5be6bdea1f

View file

@ -260,11 +260,12 @@
(let* ((id (format "%s" (alist-get 'id entry))) (let* ((id (format "%s" (alist-get 'id entry)))
(urgency (format "%0.2f" (alist-get 'urgency entry))) (urgency (format "%0.2f" (alist-get 'urgency entry)))
(priority (format " %s " (or (alist-get 'priority entry) ""))) (priority (format " %s " (or (alist-get 'priority entry) "")))
(due (format "%s" (or (taskwarrior--parse-date (alist-get 'due entry)) "")))
(annotations (format "%d" (length (or (alist-get 'annotations entry) '())))) (annotations (format "%d" (length (or (alist-get 'annotations entry) '()))))
(project (or (alist-get 'project entry) "")) (project (or (alist-get 'project entry) ""))
(tags (or (taskwarrior--concat-tag-list (alist-get 'tags entry)) "")) (tags (or (taskwarrior--concat-tag-list (alist-get 'tags entry)) ""))
(description (format "%s" (alist-get 'description entry)))) (description (format "%s" (alist-get 'description entry))))
`(,id [,id ,urgency ,priority ,annotations ,project ,tags ,description]))) `(,id [,id ,urgency ,priority ,due ,annotations ,project ,tags ,description])))
(taskwarrior-vector-to-list (taskwarrior-vector-to-list
(json-read-from-string (json-read-from-string
(taskwarrior--shell-command "export" filter)))))) (taskwarrior--shell-command "export" filter))))))
@ -338,8 +339,6 @@
(new (completing-read "Priority: " options))) (new (completing-read "Priority: " options)))
(taskwarrior--mutable-shell-command "modify" id (concat "priority:" new)))) (taskwarrior--mutable-shell-command "modify" id (concat "priority:" new))))
(defun taskwarrior-add (description) (defun taskwarrior-add (description)
"Add new task with DESCRIPTION." "Add new task with DESCRIPTION."
(interactive "sDescription: ") (interactive "sDescription: ")
@ -422,6 +421,7 @@
`[("Id" 3 nil) `[("Id" 3 nil)
("Urg" 6 taskwarrior--urgency-predicate) ("Urg" 6 taskwarrior--urgency-predicate)
("Pri" 3 nil) ("Pri" 3 nil)
("Due" 10 nil)
("Ann" 3 nil) ("Ann" 3 nil)
("Project" 15 nil) ("Project" 15 nil)
("Tags" 15 nil) ("Tags" 15 nil)