diff options
author | Thanos Apollo <[email protected]> | 2024-01-03 18:40:26 +0200 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2024-01-04 04:26:01 +0200 |
commit | d4c65c34fb4f9d1e71e5a1170a87e71e29db5c24 (patch) | |
tree | 7c21a8ea9139e48908e7dfb5de51ed1a616df8ff /gnosis.el | |
parent | 439e83a689224ec24325a93a2602107b268725c2 (diff) |
Add gnosis-get-deck-due-notes
Get due notes of specified deck-id
Diffstat (limited to 'gnosis.el')
-rw-r--r-- | gnosis.el | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -652,6 +652,16 @@ Optionally, add cusotm PROMPT." t nil)) +(defun gnosis-get-deck-due-notes (&optional deck-id) + "Return due notes for deck, with value of DECK-ID. + +if DUE is t, return only due notes" + (let* ((deck (or deck-id (gnosis--get-deck-id))) + (notes (gnosis-select 'id 'notes `(= deck-id ,deck)))) + (cl-loop for note in (apply #'append notes) + when (not (gnosis-suspended-p note)) + collect note))) + (defun gnosis-tag-prompt (&optional prompt match) "PROMPT user to select tags, until they enter `q'. Prompt user to select tags, generated from `gnosis-get-tags--unique'. @@ -1000,7 +1010,7 @@ SECOND-IMAGE: Image to display after user-input" (gnosis-select-by-tag (list (completing-read "Start session for tag: " (gnosis-review-due-notes--with-tags)))))) - ("Notes with tag(s)" (gnosis-review--session (gnosis-select-by-tag (gnosis-tag-prompt nil t))))))) + ("All notes of tag(s)" (gnosis-review--session (gnosis-select-by-tag (gnosis-tag-prompt nil t))))))) ;;; Database Schemas (defvar gnosis-db-schema-decks '([(id integer :primary-key :autoincrement) |