Add helper function to convert vector to list
This commit is contained in:
parent
df20f9d1c1
commit
24bf81685d
1 changed files with 7 additions and 2 deletions
|
@ -45,8 +45,9 @@
|
||||||
|
|
||||||
(defun taskwarrior-export (filter)
|
(defun taskwarrior-export (filter)
|
||||||
"Export taskwarrior entries as JSON"
|
"Export taskwarrior entries as JSON"
|
||||||
|
(vector-to-list
|
||||||
(json-read-from-string
|
(json-read-from-string
|
||||||
(taskwarrior--shell-command "export" filter)))
|
(taskwarrior--shell-command "export" filter))))
|
||||||
|
|
||||||
(defun taskwarrior-change-project (project)
|
(defun taskwarrior-change-project (project)
|
||||||
(interactive "sProject: ")
|
(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))
|
(while (not (equal (overlays-at (point)) nil))
|
||||||
(forward-char)))))
|
(forward-char)))))
|
||||||
|
|
||||||
|
(defun vector-to-list (vector)
|
||||||
|
"Convert a vector to a list"
|
||||||
|
(append vector nil))
|
||||||
|
|
||||||
(defun taskwarrior-write-entries ()
|
(defun taskwarrior-write-entries ()
|
||||||
(let ((entries (append (taskwarrior-export "1-1000") nil)))
|
(let ((entries (append (taskwarrior-export "1-1000") nil)))
|
||||||
(dolist (entry entries)
|
(dolist (entry entries)
|
||||||
|
|
Loading…
Reference in a new issue