summaryrefslogtreecommitdiff
path: root/gnosis.el
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-08-06 23:56:22 +0300
committerThanos Apollo <[email protected]>2024-08-06 23:56:22 +0300
commit762cbc5d944ad3dc6528108fb1e9937f0b8f8c90 (patch)
tree29ff28e61913fafb2c01fc8c2b9b1401d1b9411c /gnosis.el
parent1c2b2c4e41005e126e81aa73018d00c8004133dc (diff)
New function: get-note-tag-amnesia
* Return the minimum note tag amnesia.
Diffstat (limited to 'gnosis.el')
-rw-r--r--gnosis.el13
1 files changed, 13 insertions, 0 deletions
diff --git a/gnosis.el b/gnosis.el
index 60b8ff2..b0a9714 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -2004,6 +2004,19 @@ VALUES: Defaults to `gnosis-custom-values'."
when (plist-get (gnosis-get-custom-values :tag tag custom-values) keyword)
collect (plist-get (gnosis-get-custom-values :tag tag custom-values) keyword))))
+(defun gnosis-get-note-tag-amnesia (id &optional custom-tags custom-values)
+ "Return tag MINIMUM amnesia for note ID.
+
+The closer the amnesia value is to 0, the closer it is to total
+amnesia i.e next interval to be 0.
+
+CUSTOM-TAGS: Specify tags for note id.
+CUSTOM-VALUES: Specify values for tags."
+ (let ((amnesia-values (gnosis-get-custom-tag-values id :amnesia custom-tags custom-values)))
+ (if amnesia-values
+ (apply #'min amnesia-values)
+ gnosis-algorithm-amnesia-value)))
+
(defun gnosis-get-date-total-notes (&optional date)
"Return total notes reviewed for DATE.