diff options
author | Thanos Apollo <[email protected]> | 2024-01-02 15:28:02 +0200 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2024-01-03 07:10:23 +0200 |
commit | 7d681f4c5b3806eb3aa359f82af283ef1110cb81 (patch) | |
tree | d8ac657095a68281f2ac19576ba0246fb5a8cfcf /gnosis.el | |
parent | e2f817647e945774a108b7636b69fc8181660a79 (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.el | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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))))) |