diff --git a/taskwarrior.el b/taskwarrior.el index aabb6b1..114e234 100644 --- a/taskwarrior.el +++ b/taskwarrior.el @@ -72,12 +72,15 @@ "Open the taskwarrior buffer. If one already exists, bring it to the front and focus it. Otherwise, create one and load the data." (interactive) + (taskwarrior-update-buffer)) + +(defun taskwarrior-update-buffer () (let* ((buf (get-buffer-create "taskwarrior"))) (progn (switch-to-buffer buf) (setq font-lock-defaults '(taskwarrior-highlight-regexps)) - (toggle-read-only) (goto-char (point-min)) + (toggle-read-only) (erase-buffer) (taskwarrior-write-entries) (taskwarrior-mode)