summaryrefslogtreecommitdiff
path: root/org-fc.el
diff options
context:
space:
mode:
authorLeon Rische <leon.rische@me.com>2020-07-03 14:03:48 +0200
committerLeon Rische <leon.rische@me.com>2020-07-03 14:03:48 +0200
commit686ccd64ad09504592c8cc2c63406a0538174828 (patch)
tree999f16567c68682703897485b9673ceecdad47e5 /org-fc.el
parent656398361e70cc8461529781fbad889c5c10fd0a (diff)
Append failed cards to review session
Diffstat (limited to 'org-fc.el')
-rw-r--r--org-fc.el14
1 files changed, 14 insertions, 0 deletions
diff --git a/org-fc.el b/org-fc.el
index 9d55126..a9797a6 100644
--- a/org-fc.el
+++ b/org-fc.el
@@ -69,6 +69,11 @@ Used to generate absolute paths to the awk scripts.")
:type 'boolean
:group 'org-fc)
+(defcustom org-fc-append-failed-cards t
+ "Add failed cards to the end of the review session."
+ :type 'boolean
+ :group 'org-fc)
+
;;;; Org Tags / Properties
(defcustom org-fc-type-property "FC_TYPE"
@@ -1533,6 +1538,11 @@ EASE, BOX and INTERVAL are the current parameters of the card."
(setf (oref session current-item) card)
card))
+(defun org-fc-session-append-card (session card)
+ "Append CARD to the cards of SESSION."
+ (with-slots (cards) session
+ (setf cards (append cards (list card)))))
+
(defun org-fc-session-add-rating (session rating)
"Store RATING in the review history of SESSION."
(with-slots (ratings) session
@@ -1879,6 +1889,10 @@ same ID as the current card in the session."
(org-fc-session-add-rating org-fc-review--current-session rating)
(org-fc-review-update-data path id position rating delta)
(org-fc-review-reset)
+
+ (if (and (eq rating 'again) org-fc-append-failed-cards)
+ (org-fc-session-append-card org-fc-review--current-session card))
+
(save-buffer)
(if org-fc-reviewing-existing-buffer
(org-fc-review-reset)