diff options
author | Thanos Apollo <[email protected]> | 2024-01-01 13:03:48 +0200 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2024-01-01 13:04:03 +0200 |
commit | 5f7209509ac84945de10ed3f452a146ac96b38cf (patch) | |
tree | 3c3bca1e54555e59c6cdc90f36dc275b385d899e /gnosis.el | |
parent | 08d540fc837e156b21ee35e4eeaea1788ea0b3d0 (diff) |
gnosis-review-get-due-notes: Flatten returned list
Diffstat (limited to 'gnosis.el')
-rw-r--r-- | gnosis.el | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -583,20 +583,21 @@ Returns a list of the form ((yyyy mm dd) ef)." (= id ,note-id))])) (defun gnosis-review-get-due-notes () - "Get due notes id for current date. + "Return a list due notes id for current date. Select notes where: - Next review date <= current date - Not suspended." - (emacsql gnosis-db `[:select [id] :from review-log :where (and (<= next-rev ',(gnosis-algorithm-date)) - (= suspend 0))])) + (apply #'append + (emacsql gnosis-db `[:select [id] :from review-log :where (and (<= next-rev ',(gnosis-algorithm-date)) + (= suspend 0))]))) (defun gnosis-review-due-notes--with-tags () "Return a list of due note tags." (let ((due-notes (gnosis-review-get-due-notes))) (cl-remove-duplicates (cl-mapcan (lambda (note-id) - (gnosis-get-note-tags (car note-id))) + (gnosis-get-note-tags note-id)) due-notes) :test 'equal))) |