Add taskwarrior-reset-filter function
This commit is contained in:
parent
6a47f6a67b
commit
2351ed042d
1 changed files with 7 additions and 0 deletions
|
@ -38,6 +38,7 @@
|
||||||
(define-key taskwarrior-mode-map (kbd "d") 'taskwarrior-done)
|
(define-key taskwarrior-mode-map (kbd "d") 'taskwarrior-done)
|
||||||
(define-key taskwarrior-mode-map (kbd "D") 'taskwarrior-delete)
|
(define-key taskwarrior-mode-map (kbd "D") 'taskwarrior-delete)
|
||||||
(define-key taskwarrior-mode-map (kbd "f") 'taskwarrior-filter)
|
(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))
|
(define-key taskwarrior-mode-map (kbd "P") 'taskwarrior-change-project))
|
||||||
|
|
||||||
(defun taskwarrior--display-task-details-in-echo-area ()
|
(defun taskwarrior--display-task-details-in-echo-area ()
|
||||||
|
@ -72,6 +73,12 @@
|
||||||
((listp filter) (setq-local taskwarrior-active-filters filter))
|
((listp filter) (setq-local taskwarrior-active-filters filter))
|
||||||
(t (error "Filter did not match any supported type."))))
|
(t (error "Filter did not match any supported type."))))
|
||||||
|
|
||||||
|
(defun taskwarrior-reset-filter ()
|
||||||
|
(interactive)
|
||||||
|
(progn
|
||||||
|
(taskwarrior--set-filter "")
|
||||||
|
(taskwarrior-update-buffer "")))
|
||||||
|
|
||||||
(defun taskwarrior-filter ()
|
(defun taskwarrior-filter ()
|
||||||
(interactive)
|
(interactive)
|
||||||
(let ((new-filter (read-from-minibuffer "Filter: " (taskwarrior--get-filter-as-string))))
|
(let ((new-filter (read-from-minibuffer "Filter: " (taskwarrior--get-filter-as-string))))
|
||||||
|
|
Loading…
Reference in a new issue