From 0625ac6501884f6da8fa9fe7a55c006b328d3885 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Wed, 7 Aug 2024 01:40:04 +0300 Subject: New function: get-note-proto. --- gnosis.el | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gnosis.el b/gnosis.el index 32d1438..7e44dba 100644 --- a/gnosis.el +++ b/gnosis.el @@ -2096,6 +2096,15 @@ CUSTOM-VALUES: Specify values for tags." proto-values))) (apply #'cl-mapcar #'max padded-lists)))) +(defun gnosis-get-note-proto (id &optional custom-tags custom-deck custom-values) + "Return tag proto values for note ID." + (let* ((deck (or custom-deck (gnosis-get-note-deck-name id))) + (tags (or custom-tags (gnosis-get 'tags 'notes `(= id ,id)))) + (proto-values (or (delq nil (append (gnosis-get-custom-tag-values nil :proto tags custom-values) + (list (gnosis-get-custom-deck-value deck :proto + custom-values)))) + gnosis-algorithm-proto))) + (gnosis-proto-max-values proto-values))) (defun gnosis-get-date-total-notes (&optional date) "Return total notes reviewed for DATE. -- cgit v1.2.3