diff --git a/taskwarrior.el b/taskwarrior.el index a9f9488..65e1902 100644 --- a/taskwarrior.el +++ b/taskwarrior.el @@ -38,6 +38,7 @@ (define-key taskwarrior-mode-map (kbd "d") 'taskwarrior-done) (define-key taskwarrior-mode-map (kbd "D") 'taskwarrior-delete) (define-key taskwarrior-mode-map (kbd "f") 'taskwarrior-filter) + (define-key taskwarrior-mode-map (kbd "r") 'taskwarrior-reset-filter) (define-key taskwarrior-mode-map (kbd "P") 'taskwarrior-change-project)) (defun taskwarrior--display-task-details-in-echo-area () @@ -72,6 +73,12 @@ ((listp filter) (setq-local taskwarrior-active-filters filter)) (t (error "Filter did not match any supported type.")))) +(defun taskwarrior-reset-filter () + (interactive) + (progn + (taskwarrior--set-filter "") + (taskwarrior-update-buffer ""))) + (defun taskwarrior-filter () (interactive) (let ((new-filter (read-from-minibuffer "Filter: " (taskwarrior--get-filter-as-string))))