diff options
author | Thanos Apollo <[email protected]> | 2024-07-16 17:17:46 +0300 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2024-07-16 17:17:46 +0300 |
commit | 092b971499e7b22247ffc506a9b32fe7a1bec25d (patch) | |
tree | 4204f7ff030bdca2305c9a22908291597c652ac5 | |
parent | 10f24c92262fa38ccac8b51d91c22cd4105ca460 (diff) |
gnosis-review: Move review funcs closer together
-rw-r--r-- | gnosis.el | 33 |
1 files changed, 17 insertions, 16 deletions
@@ -1677,6 +1677,23 @@ NOTES: List of note ids" (gnosis-review-actions success note note-count)) finally (gnosis-review-commit note-count))))))) +;;;###autoload +(defun gnosis-review () + "Start gnosis review session." + (interactive) + ;; Refresh modeline + (setq gnosis-due-notes-total (length (gnosis-review-get-due-notes))) + (let ((review-type (gnosis-completing-read "Review: " '("Due notes" + "Due notes of deck" + "Due notes of specified tag(s)" + "All notes of tag(s)")))) + (pcase review-type + ("Due notes" (gnosis-review-session (gnosis-collect-note-ids :due t))) + ("Due notes of deck" (gnosis-review-session (gnosis-collect-note-ids :due t :deck (gnosis--get-deck-id)))) + ("Due notes of specified tag(s)" (gnosis-review-session (gnosis-collect-note-ids :due t :tags t))) + ("All notes of tag(s)" (gnosis-review-session (gnosis-collect-note-ids :tags t)))))) + + ;; Editing notes (defun gnosis-edit-read-only-values (&rest values) "Make the provided VALUES read-only in the whole buffer." @@ -1952,22 +1969,6 @@ to improve readability." (format "\n%s '%s" (symbol-name field) (prin1-to-string value))) (t (format "\n%s %s" (symbol-name field) (prin1-to-string value)))))))) -;;;###autoload -(defun gnosis-review () - "Start gnosis review session." - (interactive) - ;; Refresh modeline - (setq gnosis-due-notes-total (length (gnosis-review-get-due-notes))) - (let ((review-type (gnosis-completing-read "Review: " '("Due notes" - "Due notes of deck" - "Due notes of specified tag(s)" - "All notes of tag(s)")))) - (pcase review-type - ("Due notes" (gnosis-review-session (gnosis-collect-note-ids :due t))) - ("Due notes of deck" (gnosis-review-session (gnosis-collect-note-ids :due t :deck (gnosis--get-deck-id)))) - ("Due notes of specified tag(s)" (gnosis-review-session (gnosis-collect-note-ids :due t :tags t))) - ("All notes of tag(s)" (gnosis-review-session (gnosis-collect-note-ids :tags t)))))) - ;;; Database Schemas (defvar gnosis-db-schema-decks '([(id integer :primary-key :autoincrement) (name text :not-null) |