summaryrefslogtreecommitdiff
path: root/gnosis.el
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-01-03 16:49:57 +0200
committerThanos Apollo <[email protected]>2024-01-03 16:49:57 +0200
commite6f4ec838906937c346a119de6b23c3ccfa6df8b (patch)
tree2c0d70c4df95c4d968c5c026d99ba654c14d22dd /gnosis.el
parent1de9f86d6c73d2e4eba10790fd558b29b58bbc23 (diff)
Add gnosis-edit-note
Prompt user to either edit contents note or change ef values
Diffstat (limited to 'gnosis.el')
-rw-r--r--gnosis.el15
1 files changed, 12 insertions, 3 deletions
diff --git a/gnosis.el b/gnosis.el
index b9d1d8e..6c913b6 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -858,15 +858,24 @@ 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 (read-char-choice "Note Action: [n]ext, [s]uspend, [q]uit: " '(?n ?s ?q))
+ (pcase (read-char-choice "Note Action: [n]ext, [s]uspend, [e]dit, [q]uit: " '(?n ?s ?e ?q))
(?n nil)
(?s (gnosis-suspend-note note))
+ (?e (progn (gnosis-edit-note note)
+ (recursive-edit)))
(?q (progn (gnosis-review-commit note-count)
- (cl-return)))))
+ (cl-return)))))
finally (gnosis-review-commit note-count)))))
-;; Change values
+;; Editing notes
+
+(defun gnosis-edit-note (id)
+ "Edit note with value of id ID."
+ (pcase (completing-read "Edit: " '(contents ef) nil t)
+ ("contents" (gnosis-edit-note-contents id))
+ ("ef" (gnosis-edit-ef id))
+ (_ (message "No such value."))))
(defun gnosis-edit-ef (id)
"Edit easiness factor values for note with id value ID."