From dc7652ceee147a3dcba3366051effea58d6b9bc8 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Wed, 1 May 2024 20:41:01 +0300 Subject: Rename gnosis-due-notes -> gnosis-due-notes-total Make var name clear that it represents total count. due notes might be asumed as a list of note ids --- gnosis.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gnosis.el b/gnosis.el index 1badcd2..c452d5d 100644 --- a/gnosis.el +++ b/gnosis.el @@ -162,7 +162,7 @@ Seperate the question/stem from options." :type 'string :group 'gnosis) -(defvar gnosis-due-notes (length (gnosis-review-get-due-notes)) +(defvar gnosis-due-notes-total nil "Total due notes.") ;;; Faces @@ -1872,17 +1872,18 @@ DASHBOARD-TYPE: either 'Notes' or 'Decks' to display the respective dashboard." :global t :group 'gnosis :lighter nil + (setq gnosis-due-notes-total (length (gnosis-review-get-due-notes))) (if gnosis-modeline-mode (progn (add-to-list 'global-mode-string '(:eval - (format " G:%d" gnosis-due-notes))) + (format " G:%d" gnosis-due-notes-total))) (force-mode-line-update)) (setq global-mode-string (seq-remove (lambda (item) (and (listp item) (eq (car item) :eval) (string-prefix-p " G:" (format "%s" (eval (cadr item)))))) global-mode-string)) - (run-at-time "5 min" 300 #'(lambda () (setq gnosis-due-notes (length (gnosis-review-get-due-notes))))) + (run-at-time "5 min" 300 #'(lambda () (setq gnosis-due-notes-total (length (gnosis-review-get-due-notes))))) (force-mode-line-update))) (define-derived-mode gnosis-mode special-mode "Gnosis" -- cgit v1.2.3