From 24bf81685d577f76cd3093ad1409cb7ea7246d14 Mon Sep 17 00:00:00 2001 From: Patrick Winter Date: Tue, 23 Oct 2018 22:13:21 +0200 Subject: [PATCH] Add helper function to convert vector to list --- taskwarrior.el | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/taskwarrior.el b/taskwarrior.el index 9e066a8..3f8cc8a 100644 --- a/taskwarrior.el +++ b/taskwarrior.el @@ -45,8 +45,9 @@ (defun taskwarrior-export (filter) "Export taskwarrior entries as JSON" - (json-read-from-string - (taskwarrior--shell-command "export" filter))) + (vector-to-list + (json-read-from-string + (taskwarrior--shell-command "export" filter)))) (defun taskwarrior-change-project (project) (interactive "sProject: ") @@ -91,6 +92,10 @@ the front and focus it. Otherwise, create one and load the data." (while (not (equal (overlays-at (point)) nil)) (forward-char))))) +(defun vector-to-list (vector) + "Convert a vector to a list" + (append vector nil)) + (defun taskwarrior-write-entries () (let ((entries (append (taskwarrior-export "1-1000") nil))) (dolist (entry entries)