diff options
author | Leon Rische <leon.rische@me.com> | 2020-07-03 14:03:48 +0200 |
---|---|---|
committer | Leon Rische <leon.rische@me.com> | 2020-07-03 14:03:48 +0200 |
commit | 686ccd64ad09504592c8cc2c63406a0538174828 (patch) | |
tree | 999f16567c68682703897485b9673ceecdad47e5 | |
parent | 656398361e70cc8461529781fbad889c5c10fd0a (diff) |
Append failed cards to review session
-rw-r--r-- | Changelog.org | 4 | ||||
-rw-r--r-- | README.org | 5 | ||||
-rw-r--r-- | org-fc.el | 14 |
3 files changed, 22 insertions, 1 deletions
diff --git a/Changelog.org b/Changelog.org index baa7d26..17f5e3b 100644 --- a/Changelog.org +++ b/Changelog.org @@ -5,6 +5,10 @@ upcoming changes. In case a update to the org sources is needed, I'll add a changelog entry with updating instructions. +** [2020-07-03 Fri] +*** Changed +- By default, failed cards are appended to the end of the review session. + This can be configured via ~org-fc-append-failed-cards~ ** [2020-07-02 Thu] *** Changed - ~org-fc-review-rate-card~ was renamed to ~org-fc-review-rate~ @@ -251,9 +251,12 @@ See also: - [[https://www.supermemo.com/en/archives1990-2015/english/ol/sm2][SuperMemo - SM2 Algorithm]] ** Review A review session can be started with ~M-x org-fc-review~. - Due cards are reviewed in random order. +If a card was rated "again", it will be reviewed again at the end of +the current review session. +This can be disabled by setting ~org-fc-append-failed-cards~ to ~nil~. + *** Review Process 1. Open file of card 2. Narrow to heading @@ -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) |