<feed xmlns='http://www.w3.org/2005/Atom'>
<title>chime/tests/test-chime-numeric-defcustom-setters.el, branch main</title>
<subtitle>Emacs chimes, notifications, and modeline reminders so you don't miss events
</subtitle>
<id>https://git.cjennings.net/chime/atom?h=main</id>
<link rel='self' href='https://git.cjennings.net/chime/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/chime/'/>
<updated>2026-06-11T19:54:03+00:00</updated>
<entry>
<title>test: add failing tests for the async fetch watchdog</title>
<updated>2026-06-11T19:54:03+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-06-11T19:54:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/chime/commit/?id=6b8918b4cc44dc39e70a5544e8286eb781a97ccc'/>
<id>urn:sha1:6b8918b4cc44dc39e70a5544e8286eb781a97ccc</id>
<content type='text'>
</content>
</entry>
<entry>
<title>refactor!: demote chime-validation-max-retries to private defvar</title>
<updated>2026-05-05T17:24:56+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-05T17:24:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/chime/commit/?id=0b65f607102c12260c7cca5df3d8586c2b1a24bd'/>
<id>urn:sha1:0b65f607102c12260c7cca5df3d8586c2b1a24bd</id>
<content type='text'>
This is an internal startup-timing parameter, not a knob real users have
reason to tune through `M-x customize'. I demoted it from defcustom to
defvar and renamed it to `chime--validation-max-retries' to make the
private status explicit. Anyone who was overriding it can keep doing so
with `setq' (the variable still exists, just under the new name).

The three customize-time validation tests went away with the defcustom —
nothing left to validate at customize-time once it stops being a
customize-target. The setter helper still applies to the other five
numeric defcustoms.

Test files that referenced the variable (`test-chime-validation-retry.el',
`test-integration-chime-mode.el') were renamed mechanically along with
the source.

Breaking change: `(setq chime-validation-max-retries N)' becomes
`(setq chime--validation-max-retries N)' if you actually had it. Most
users won't have touched it.
</content>
</entry>
<entry>
<title>fix: validate numeric defcustoms at customize-time</title>
<updated>2026-05-05T17:20:29+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-05T17:20:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/chime/commit/?id=68877f04c2ceb569ae5cd74b8303b84b36ced1c5'/>
<id>urn:sha1:68877f04c2ceb569ae5cd74b8303b84b36ced1c5</id>
<content type='text'>
Six numeric settings are declared as integers but were read straight into
arithmetic and timer math.  A bad value (string, negative number, nil where
nil isn't supported) used to slip past the defcustom and surface as a
timer error or `arith-error' deep in a callback, instead of as a
configuration problem at the moment the user set it.

I added `chime--validate-integer-setting' as a small shared helper and
wired a `:set' on each of the affected defcustoms:

- `chime-modeline-lookahead-minutes' — integer &gt;= 0 (0 disables)
- `chime-tooltip-lookahead-hours'    — integer &gt;= 1
- `chime-modeline-tooltip-max-events' — integer &gt;= 1 or nil (show all)
- `chime-day-wide-advance-notice'    — integer &gt;= 0 or nil (same-day only)
- `chime-max-consecutive-failures'   — integer &gt;= 0 (0 disables warnings)
- `chime-validation-max-retries'     — integer &gt;= 0 (0 = fail immediately)

The constraints follow each docstring's stated intent.  The helper signals
`user-error', so `customize-set-variable' surfaces it as a config problem
rather than a generic error trace.

Tests: 22 cases in `tests/test-chime-numeric-defcustom-setters.el' —
five direct on the helper plus each defcustom's accept/reject paths
through `customize-set-variable'.
</content>
</entry>
</feed>
