summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-05-01 20:41:01 +0300
committerThanos Apollo <[email protected]>2024-05-01 20:41:01 +0300
commitdc7652ceee147a3dcba3366051effea58d6b9bc8 (patch)
tree9aa34151c236ad684a54a028cd5467cd32265325
parent7fa320defe53bf4a98c7a8e59af1152514d30709 (diff)
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
-rw-r--r--gnosis.el7
1 files 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"