Add keybinding to update taskwarrior buffer

This commit is contained in:
Patrick Winter 2018-10-24 21:43:09 +02:00
parent d1bf77d3b8
commit e93bc7c805

View file

@ -27,6 +27,7 @@
(define-key taskwarrior-mode-map (kbd "n") 'next-line) (define-key taskwarrior-mode-map (kbd "n") 'next-line)
(define-key taskwarrior-mode-map (kbd "j") 'next-line) (define-key taskwarrior-mode-map (kbd "j") 'next-line)
(define-key taskwarrior-mode-map (kbd "q") 'quit-window) (define-key taskwarrior-mode-map (kbd "q") 'quit-window)
(define-key taskwarrior-mode-map (kbd "u") 'taskwarrior-update-buffer)
(define-key taskwarrior-mode-map (kbd "a") 'taskwarrior-add) (define-key taskwarrior-mode-map (kbd "a") 'taskwarrior-add)
(define-key taskwarrior-mode-map (kbd "p") 'taskwarrior-change-project)) (define-key taskwarrior-mode-map (kbd "p") 'taskwarrior-change-project))
@ -82,6 +83,7 @@ the front and focus it. Otherwise, create one and load the data."
(taskwarrior-update-buffer)) (taskwarrior-update-buffer))
(defun taskwarrior-update-buffer () (defun taskwarrior-update-buffer ()
(interactive)
(let* ((buf (get-buffer-create "taskwarrior"))) (let* ((buf (get-buffer-create "taskwarrior")))
(progn (progn
(switch-to-buffer buf) (switch-to-buffer buf)