summaryrefslogtreecommitdiff
path: root/org-fc.el
diff options
context:
space:
mode:
authordalz <dalz@alsd.eu>2020-08-03 23:50:05 +0200
committerdalz <dalz@alsd.eu>2020-08-04 15:19:32 +0200
commit7c4b5c1d1c1ede13d93b5ad8b3eb454860483ffb (patch)
tree02026405e5950c7586e6c9aee606b8dce2e36f96 /org-fc.el
parent237da91faa143dee8772f9989943f799f9b2654a (diff)
add org-fc-bury-siblings
Diffstat (limited to 'org-fc.el')
-rw-r--r--org-fc.el18
1 files changed, 17 insertions, 1 deletions
diff --git a/org-fc.el b/org-fc.el
index 4450d11..b28ee75 100644
--- a/org-fc.el
+++ b/org-fc.el
@@ -76,6 +76,11 @@ Used to generate absolute paths to the awk scripts.")
:type 'string
:group 'org-fc)
+(defcustom org-fc-cloze-type-property "FC_CLOZE_TYPE"
+ "Property used to store the card's subtype for cloze cards."
+ :type 'string
+ :group 'org-fc)
+
(defcustom org-fc-created-property "FC_CREATED"
"Property used to store the cards creation time."
:type 'string
@@ -191,6 +196,12 @@ Values are in days."
:type 'float
:group 'org-fc)
+(defcustom org-fc-bury-siblings nil
+ "Whether or not multiple positions of the same card should be shown during
+review. Does not apply to cloze single and cloze enumeration cards."
+ :type 'boolean
+ :group 'org-fc)
+
;;;; Hooks
(defcustom org-fc-before-setup-hook '()
@@ -1228,6 +1239,7 @@ With the '-L' option, 'find' follows symlinks."
`(("fc_tag" . ,org-fc-flashcard-tag)
("suspended_tag" . ,org-fc-suspended-tag)
("type_property" . ,org-fc-type-property)
+ ("cloze_type_property" . ,org-fc-cloze-type-property)
("created_property" . ,org-fc-created-property)
("review_data_drawer" . ,org-fc-review-data-drawer)))
@@ -1410,7 +1422,11 @@ Cards with no positions are removed from the index."
(time-less-p (plist-get pos :due) now))
(plist-get card :positions))))
(unless (null due)
- (plist-put card :positions due)
+ (plist-put
+ card :positions
+ (if (or (not org-fc-bury-siblings)
+ (member (plist-get card :cloze-type) '(single enumeration)))
+ due (list (car due))))
(push card res)))))
res))