summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-04-11 09:48:19 +0300
committerThanos Apollo <[email protected]>2024-04-11 09:48:19 +0300
commit1340536669753f9a4953f738de0cfc1d190238bf (patch)
tree94afe93da96057fe67a4e97f5b3bff0dba8a44c9
parent2486661ba86dd02d3abe4dc7f92ab68b84602c86 (diff)
Add gnosis-review-override
Reverses the result of review
-rw-r--r--gnosis.el12
1 files changed, 11 insertions, 1 deletions
diff --git a/gnosis.el b/gnosis.el
index 3890ac5..1f3a7ae 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -1216,6 +1216,16 @@ NOTE-NUM: The number of notes reviewed in the session."
(gnosis-vc-push))
(message "Review session finished. %d notes reviewed." note-num)))
+(defun gnosis-review-override (id success)
+ "Override review result of note ID.
+
+Reverse the result of review SUCCESS."
+ (let ((success-new (if success nil t)))
+ (gnosis-display-next-review id success-new)
+ (if (y-or-n-p (format "Override review result as %s?" (if success-new "`SUCCESS'" "`FAILURE'")))
+ (gnosis-review--update id success-new)
+ (gnosis-review-override id success-new))))
+
(defun gnosis-review--session (notes)
"Start review session for NOTES.
@@ -1235,7 +1245,7 @@ NOTES: List of note ids"
(?e "edit")
(?q "quit"))))
(?n (gnosis-review--update note success))
- (?o (gnosis-review--update note (if success nil t)))
+ (?o (gnosis-review-override note success))
(?s (gnosis-suspend-note note))
(?e (gnosis-review--update note success)
(gnosis-edit-note note t)