From 762cbc5d944ad3dc6528108fb1e9937f0b8f8c90 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Tue, 6 Aug 2024 23:56:22 +0300 Subject: New function: get-note-tag-amnesia * Return the minimum note tag amnesia. --- gnosis.el | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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. -- cgit v1.2.3