diff options
author | Thanos Apollo <[email protected]> | 2023-12-25 05:01:58 +0200 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2023-12-25 05:01:58 +0200 |
commit | 3aa99b120a16882c26617e4775689b2d52c1b567 (patch) | |
tree | 7319ded9c7fddec6b8319a73521230b8dda78466 /gnosis.el | |
parent | db4b1be571a29291cfb7a635ed8156f31040e621 (diff) |
gnosis-review: Add y-or-n-p for review next note
Prompt user for y or n to review next note
- Give time to read extra section
Diffstat (limited to 'gnosis.el')
-rw-r--r-- | gnosis.el | 17 |
1 files changed, 11 insertions, 6 deletions
@@ -239,14 +239,19 @@ Returns a list of the form (ef-increase ef-decrease ef)." (defun gnosis-review () "Start gnosis session." (interactive) - (let ((due-notes (gnosis-review-get-due-notes)) - (note-count 0)) + (let* ((due-notes (gnosis-review-get-due-notes)) + (note-count 0) + (total-notes (length due-notes))) (if (null due-notes) - (message "No 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))) - finally (message "Review session finished. %d note(s) reviewed." note-count))))) + 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))))) ;;; Database Schemas ;; Enable foreign_keys |