<feed xmlns='http://www.w3.org/2005/Atom'>
<title>gloss/tests/test-gloss-drill--export-all-skips-already-tagged.el, branch main</title>
<subtitle>Emacs glossary lookup with Wiktionary fallback
</subtitle>
<id>https://git.cjennings.net/gloss/atom?h=main</id>
<link rel='self' href='https://git.cjennings.net/gloss/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/gloss/'/>
<updated>2026-04-30T05:30:36+00:00</updated>
<entry>
<title>feat: implement gloss-drill org-drill export</title>
<updated>2026-04-30T05:30:36+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-04-30T05:30:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/gloss/commit/?id=5b5ac68e138950e2f8d502e22350a62570da88a6'/>
<id>urn:sha1:5b5ac68e138950e2f8d502e22350a62570da88a6</id>
<content type='text'>
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).
</content>
</entry>
<entry>
<title>test: add gloss-drill test suite (red phase)</title>
<updated>2026-04-30T05:28:29+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-04-30T05:28:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/gloss/commit/?id=e7938e9193ba1a39aab0e614bb3bf682508685b2'/>
<id>urn:sha1:e7938e9193ba1a39aab0e614bb3bf682508685b2</id>
<content type='text'>
Four test files plus a small testutil for toggling the `org-drill'
feature flag. All 10 tests fail at this commit because the implementation
is still a stub.

The suite covers Normal (untagged entries get the tag and property),
Boundary (empty file, idempotency, untag never-tagged), and Error
(org-drill not installed). The error path also asserts the file is left
untouched. Untag-all is tested under both feature states because the
user might want to remove tags after uninstalling org-drill.
</content>
</entry>
</feed>
