diff options
author | Thanos Apollo <[email protected]> | 2024-08-07 01:39:31 +0300 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2024-08-07 01:39:31 +0300 |
commit | 95fda0a8e3819f833334bbcfeda5fbe85be6dfe9 (patch) | |
tree | f2727d8fd910fb7807a8921149c6e637e34b0e2d /gnosis.el | |
parent | a755a634eadea49829d4231d510ee8976d08f473 (diff) |
New function: proto-max-values.
* To be used with get-note-proto, to return the max list of proto values.
Diffstat (limited to 'gnosis.el')
-rw-r--r-- | gnosis.el | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -2085,6 +2085,17 @@ CUSTOM-VALUES: Specify values for tags." (if (>= max-agnoia 1) (error "Agnoia value must be lower than 1") max-agnoia))) + +(defun gnosis-proto-max-values (proto-values) + "Return max values from PROTO-VALUES." + (if (not (and (listp proto-values) (cl-every #'listp proto-values))) + proto-values + (let* ((max-len (apply #'max (mapcar #'length proto-values))) + (padded-lists (mapcar (lambda (lst) + (append lst (make-list (- max-len (length lst)) 0))) + proto-values))) + (apply #'cl-mapcar #'max padded-lists)))) + (defun gnosis-get-date-total-notes (&optional date) "Return total notes reviewed for DATE. |