From 9694ae644851d42365de27e5bdfb690b792909d1 Mon Sep 17 00:00:00 2001 From: Leon Rische Date: Sun, 7 Mar 2021 18:08:11 +0100 Subject: Fix dashboard revert --- org-fc-dashboard.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/org-fc-dashboard.el b/org-fc-dashboard.el index 38a7f8e..cf25056 100644 --- a/org-fc-dashboard.el +++ b/org-fc-dashboard.el @@ -256,16 +256,20 @@ environment without svg support." (interactive) (org-fc-review org-fc-dashboard-context)) +(defun org-fc-dashboard-revert (_ignore-auto _noconfirm) + "Reload the current dashboard." + (interactive) + (org-fc-dashboard-view org-fc-dashboard-context)) + (defvar org-fc-dashboard-mode-map (let ((map (make-sparse-keymap))) (define-key map (kbd "r") 'org-fc-dashboard-review) (define-key map (kbd "q") 'quit-window) - (define-key map (kbd "G") 'org-fc-dashboard-view) map)) (define-derived-mode org-fc-dashboard-mode special-mode "org-fc main" "Major mode providing an overview of the flashcard system" - (set (make-local-variable 'revert-buffer-function) #'org-fc-dashboard-view) + (set (make-local-variable 'revert-buffer-function) #'org-fc-dashboard-revert) (setq-local cursor-type nil)) ;;;###autoload -- cgit v1.2.3