From 75a7e3f147b131d3d103cbb6885d1edae281c7f3 Mon Sep 17 00:00:00 2001 From: Patrick Winter Date: Wed, 4 Sep 2019 21:27:21 +0200 Subject: [PATCH] Display annotation count --- taskwarrior.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/taskwarrior.el b/taskwarrior.el index 62d1053..c061186 100644 --- a/taskwarrior.el +++ b/taskwarrior.el @@ -216,10 +216,11 @@ (let* ((id (format "%s" (alist-get 'id entry))) (urgency (format "%0.2f" (alist-get 'urgency entry))) (priority (format " %s " (or (alist-get 'priority entry) ""))) + (annotations (format "%d" (length (or (alist-get 'annotations entry) '())))) (project (or (format "%s" (alist-get 'project entry)) "")) (tags (or (taskwarrior--concat-tag-list (alist-get 'tags entry)) "")) (description (format "%s" (alist-get 'description entry)))) - `(,id [,id ,urgency ,priority ,project ,tags ,description]))) + `(,id [,id ,urgency ,priority ,annotations ,project ,tags ,description]))) (vector-to-list (json-read-from-string (taskwarrior--shell-command "export" "id.not:0"))))) @@ -353,6 +354,7 @@ `[("Id" 3 nil) ("Urg" 6 taskwarrior--urgency-predicate) ("Pri" 3 nil) + ("Ann" 3 nil) ("Project" 15 nil) ("Tags" 15 nil) ("Description" 100 nil)])