diff options
author | Thanos Apollo <[email protected]> | 2023-12-28 07:33:30 +0200 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2023-12-28 07:33:30 +0200 |
commit | 962048711ceb5ccc9ad68fafe6e2bc849f5ebd8e (patch) | |
tree | 511357c92a53549e2fb9ffb5249ef679d09bac63 /gnosis.el | |
parent | 4cb80ac12ad21eb13a48e2b54edb3c3d91600514 (diff) |
Rewrite gnosis-review-all-due-notes
Diffstat (limited to 'gnosis.el')
-rw-r--r-- | gnosis.el | 18 |
1 files changed, 10 insertions, 8 deletions
@@ -561,19 +561,21 @@ If user-input is equal to CLOZE, return t." (while (y-or-n-p "Review next note?") (gnosis-review-note note))) finally (message "Review session finished")))) +(defun gnosis-review-all-due-notes () + "Review all due notes." (let* ((due-notes (gnosis-review-get-due-notes)) (note-count 0) (total-notes (length due-notes))) (if (null due-notes) (message "No due notes.") - (cl-loop for note in due-notes - do (progn - (gnosis-review-note (car note)) - (setf note-count (+ note-count 1)) - (when (and (< note-count total-notes) - (not (y-or-n-p "Review next note?"))) - (cl-return))) - finally (message "Review session finished. %d note(s) reviewed." note-count))))) + (when (y-or-n-p (format "You have %s total notes for review, start session?" total-notes)) + (cl-loop for note in due-notes + do (progn + (gnosis-review-note (car note)) + (setf note-count (+ note-count 1)) + (when (not (y-or-n-p "Review next note?")) + (cl-return))) + finally (message "Review session finished. %d note(s) reviewed." note-count)))))) ;;; Database Schemas ;; Enable foreign_keys |