diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-05 09:46:28 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-05 09:46:28 -0500 |
| commit | cbc1351a131a2c358b211d886cc8c687f57657b1 (patch) | |
| tree | bcd390fd97f52bd9ea462bed78bd10016ed84c53 /scripts | |
| parent | f32c08a8ab4adac705cd659b2579f293743ec0f0 (diff) | |
| download | org-drill-cbc1351a131a2c358b211d886cc8c687f57657b1.tar.gz org-drill-cbc1351a131a2c358b211d886cc8c687f57657b1.zip | |
refactor: split org-drill-entry-status classifier from its predicates
Two extractions out of the 58-line cond:
- org-drill--entry-empty-and-not-empty-friendly-p: encapsulates the
ugly nested predicate that means 'body is empty AND the card
type doesn't opt in to empty bodies'. Used to be 5 inlined
lines including a let* and an alist lookup.
- org-drill--classify-status: takes the precomputed DUE and
LAST-INT and walks the cond. The decision tree is now a
flat sequence of one-line clauses.
org-drill-entry-status itself drops to 8 lines and reads as
'compute the inputs, classify, return triple'. The :failed branch
also uses org-drill--quality-failed-p instead of inlining the
threshold check.
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
