Rename taskwarrior buffer
This commit is contained in:
parent
f1fad58220
commit
4e13f8a7f1
1 changed files with 6 additions and 1 deletions
|
@ -5,11 +5,14 @@
|
|||
;; TODO: Extract "1-1000" id filter into variable
|
||||
;; TODO: Figure out the difference between assoc and assoc-string
|
||||
;; (and why alist-get does not work with strings)
|
||||
;; TODO: Restore position after taskwarrior-update-buffer is called
|
||||
|
||||
(require 'json)
|
||||
|
||||
(defgroup taskwarrior nil "An emacs frontend to taskwarrior.")
|
||||
|
||||
(defvar taskwarrior-buffer-name "*taskwarrior*")
|
||||
|
||||
(defconst taskwarrior-mutating-commands '("add" "modify"))
|
||||
|
||||
(defvar taskwarrior-description 'taskwarrior-description
|
||||
|
@ -78,6 +81,7 @@
|
|||
(taskwarrior-update-buffer new-filter))))
|
||||
|
||||
(defun taskwarrior--shell-command (command &optional filter modifications miscellaneous)
|
||||
;; Taskwarrior
|
||||
(shell-command-to-string
|
||||
(format "task %s %s %s %s"
|
||||
(or filter "")
|
||||
|
@ -126,7 +130,8 @@
|
|||
(defun taskwarrior-add (description)
|
||||
(interactive "sDescription: ")
|
||||
(message (taskwarrior--shell-command "add" "" description))
|
||||
(taskwarrior-update-buffer))
|
||||
(when (eq (buffer-name) taskwarrior-buffer-name)
|
||||
(taskwarrior-update-buffer)))
|
||||
|
||||
(defun taskwarrior-done ()
|
||||
"Mark current task as done."
|
||||
|
|
Loading…
Reference in a new issue