From bafa281b9c0b3ccc78b4a8420a817662d50ca86f Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 31 May 2026 06:53:06 -0500 Subject: 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. --- org-drill.org | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'org-drill.org') 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 -- cgit v1.2.3