summaryrefslogtreecommitdiff
path: root/gnosis.el
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-01-02 15:28:02 +0200
committerThanos Apollo <[email protected]>2024-01-03 07:10:23 +0200
commit7d681f4c5b3806eb3aa359f82af283ef1110cb81 (patch)
treed8ac657095a68281f2ac19576ba0246fb5a8cfcf /gnosis.el
parente2f817647e945774a108b7636b69fc8181660a79 (diff)
gnosis-review--session: Redo with read-char-choice
Previous implemntation with completing-read takes 1+ keypresses (select option & enter). Using read-char-choice we reduce it to 1. Maybe we can add a custom option for next, to optionally be e.g space to make it more anki like
Diffstat (limited to 'gnosis.el')
-rw-r--r--gnosis.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/gnosis.el b/gnosis.el
index b82a4a7..c7c3fa5 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -851,10 +851,10 @@ NOTE-NUM: The number of notes reviewed in the session."
(cl-loop for note in notes
do (progn (gnosis-review-note note)
(setf note-count (1+ note-count))
- (pcase (completing-read "Note Action: " '(next suspend quit))
- ("next" nil)
- ("suspend" (gnosis-suspend-note note))
- ("quit" (progn (gnosis-review-commit note-count)
+ (pcase (read-char-choice "Note Action: [n]ext, [s]uspend, [q]uit: " '(?n ?s ?q))
+ (?n nil)
+ (?s (gnosis-suspend-note note))
+ (?q (progn (gnosis-review-commit note-count)
(cl-return)))))
finally (gnosis-review-commit note-count)))))