diff options
| author | Craig Jennings <c@cjennings.net> | 2026-04-30 00:30:36 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-04-30 00:30:36 -0500 |
| commit | 5b5ac68e138950e2f8d502e22350a62570da88a6 (patch) | |
| tree | 81c27f9ff1d3d3e7443f3fcfc9785d9df7f04c29 /docs/decisions | |
| parent | e7938e9193ba1a39aab0e614bb3bf682508685b2 (diff) | |
| download | gloss-5b5ac68e138950e2f8d502e22350a62570da88a6.tar.gz gloss-5b5ac68e138950e2f8d502e22350a62570da88a6.zip | |
feat: implement gloss-drill org-drill export
Two public commands plus a small helper. `gloss-drill-export-all'
walks `gloss-file' via `org-map-entries' and adds `:drill:' tag and
`DRILL_CARD_TYPE: twosided' property to every top-level entry.
Membership and equality guards make the operation idempotent: re-running
adds nothing and writes nothing. `gloss-drill-untag-all' is the
reverse, and intentionally does not require `org-drill' to be installed
(the user might be cleaning up after uninstalling).
The walking logic factors into a single private helper
`gloss-drill--map-entries' that handles file open, modtime
verification, org-mode activation, the level-1 filter, and a
write-only-if-modified save. Both public commands compose it with their
respective per-entry mutators.
`org-drill' presence is checked with `featurep' before any walk so the
file is never touched when the dep is missing. The user-error message
includes the install command.
Folds in a small fix to the idempotency test helper: the original used
`throw' from inside `org-map-entries' but did not return the count to
the caller. Switched to `catch' / `throw' with the count as the throw
value.
98 tests pass in 0.24s — 88 prior plus 10 new across the four scenarios
named in the design doc (tags-untagged, skips-already-tagged,
no-orgdrill-installed, untag-all).
Diffstat (limited to 'docs/decisions')
0 files changed, 0 insertions, 0 deletions
