From 1340536669753f9a4953f738de0cfc1d190238bf Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Thu, 11 Apr 2024 09:48:19 +0300 Subject: Add gnosis-review-override Reverses the result of review --- gnosis.el | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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) -- cgit v1.2.3