summaryrefslogtreecommitdiff
path: root/gnosis.el
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-08-06 23:53:14 +0300
committerThanos Apollo <[email protected]>2024-08-06 23:53:14 +0300
commit9ad5793b12a1195878113337c117461c929dcfb2 (patch)
tree5e1400dcd74e64d58cc5be96dd0aa4d254b6d353 /gnosis.el
parent37f8a26b38b7234f3aef5031662e1f6a2ab1af95 (diff)
New function: get-custom-deck-value
* Return custom deck value for deck, avoiding code repetition.
Diffstat (limited to 'gnosis.el')
-rw-r--r--gnosis.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/gnosis.el b/gnosis.el
index 6c69b98..c7d02a5 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -1991,6 +1991,10 @@ VALUES: Defaults to `gnosis-custom-values'."
(setq results (append results (nth 2 rule)))))
results))
+(defun gnosis-get-custom-deck-value (deck value &optional values)
+ "Return custom VALUE for note DECK."
+ (plist-get (gnosis-get-custom-values :deck deck values) value))
+
(defun gnosis-get-date-total-notes (&optional date)
"Return total notes reviewed for DATE.