aboutsummaryrefslogtreecommitdiff
path: root/org-drill.org
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-31 06:53:06 -0500
committerCraig Jennings <c@cjennings.net>2026-05-31 06:53:06 -0500
commitbafa281b9c0b3ccc78b4a8420a817662d50ca86f (patch)
tree855a7f668145c41bb09670136c537e1d7244128e /org-drill.org
parent79f454cbfcfcf61bae34a9fdf85841617e2b1c00 (diff)
downloadorg-drill-bafa281b9c0b3ccc78b4a8420a817662d50ca86f.tar.gz
org-drill-bafa281b9c0b3ccc78b4a8420a817662d50ca86f.zip
feat: add org-drill-treat-headline-as-card-p for empty-bodied cards
A drill entry with an empty body is skipped unless its card type opts into empty bodies via the DRILL-EMPTY-P slot of org-drill-card-type-alist. That left no global way to drill headline-only items, or hierarchical-notes decks where the heading is the question and the answer lives in child entries (upstream #30, #41). I added org-drill-treat-headline-as-card-p, default nil so existing decks are unchanged. When it's on, the empty-skip gate in org-drill--entry-empty-and-not-empty-friendly-p short-circuits, so every empty-bodied entry is drilled with its heading as the question regardless of card type. I added the safe-local-variable booleanp declaration alongside the other booleans and documented the switch in org-drill.org. Tests pin the predicate and the classify-status outcome both on and off, and confirm the per-card-type DRILL-EMPTY-P path stays independent of the new switch.
Diffstat (limited to 'org-drill.org')
-rw-r--r--org-drill.org4
1 files changed, 4 insertions, 0 deletions
diff --git a/org-drill.org b/org-drill.org
index d0a0857..34092d0 100644
--- a/org-drill.org
+++ b/org-drill.org
@@ -386,6 +386,10 @@ drill session, you can either:
2. Change the entry for its card type in =org-drill-card-type-alist= so that
items of this type will always be tested, even if they have an empty body.
See the documentation for =org-drill-card-type-alist= for details.
+3. Set =org-drill-treat-headline-as-card-p= to =t=. This is a global switch:
+ when on, every empty-bodied drill item is tested with its heading as the
+ question, regardless of card type. Useful for hierarchical-notes decks where
+ the heading is the prompt and the answer lives in child items.
* Running the drill session