<feed xmlns='http://www.w3.org/2005/Atom'>
<title>emacs-wttrin/tests/test-wttrin-mode-initialization-order.el, branch release/0.4.0</title>
<subtitle>Emacs frontend for Igor Chubin's wttr.in weather service
</subtitle>
<id>https://git.cjennings.net/emacs-wttrin/atom?h=release%2F0.4.0</id>
<link rel='self' href='https://git.cjennings.net/emacs-wttrin/atom?h=release%2F0.4.0'/>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/emacs-wttrin/'/>
<updated>2026-05-05T14:37:12+00:00</updated>
<entry>
<title>fix(ci): rewrite mode-init-order test and retry deps install</title>
<updated>2026-05-05T14:37:12+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-05T14:37:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/emacs-wttrin/commit/?id=b83865a65eb744f6d36c1c672a4d83a59d6383f8'/>
<id>urn:sha1:b83865a65eb744f6d36c1c672a4d83a59d6383f8</id>
<content type='text'>
Two CI failures from the first run, neither a real bug in production code.

The Emacs-snapshot job failed on
`test-wttrin-mode-initialization-order-normal-mode-before-buffer-local-vars-calls-mode-first`.
The original test mocked the `set' primitive to detect when
`xterm-color--state' was first set. That worked on the byte-code path some
older Emacs versions used, but `setq-local' doesn't go through the `set'
function on Emacs master, so the mock never fired and the assertion read nil.
The test was already brittle in isolation locally too.

Rewrote the test to use `advice-add :before' on `wttrin-mode' and
`make-local-variable'. Both are ordinary advisable functions, and
`make-local-variable' is on the code path for every form that defines a
buffer-local binding (`setq-local', `defvar-local', etc.) so the observation
holds across Emacs versions. Renamed the test to drop "calls-mode-first"
and use "mode-runs-before-xterm-color-state-binding" since that's what the
new advice actually observes.

The Emacs 26.3 job failed with a transient DNS error from elpa.gnu.org
during `make deps'. Wrapped the install step in a 3-attempt retry with a
15-second backoff so a runner-side network blip doesn't fail the build.
Applied to all three jobs (test, lint, coverage) since they all hit the
same archives.
</content>
</entry>
<entry>
<title>doc: update copyright years to 2026 and add missing author field</title>
<updated>2026-04-04T17:51:32+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-04-04T17:51:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/emacs-wttrin/commit/?id=622ae39ad1e2544980cff73af8a5d5b2a64dacc8'/>
<id>urn:sha1:622ae39ad1e2544980cff73af8a5d5b2a64dacc8</id>
<content type='text'>
Update copyright headers across all 37 .el files to include 2026.
Add missing Author field to testutil-wttrin.el for consistency.
</content>
</entry>
<entry>
<title>refactor: tests: standardize naming, consolidate files, and expand testutil</title>
<updated>2026-02-18T01:14:14+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-02-18T01:14:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/emacs-wttrin/commit/?id=28b7e4cecadce207d532b8d42346c3823450a35f'/>
<id>urn:sha1:28b7e4cecadce207d532b8d42346c3823450a35f</id>
<content type='text'>
- Expand testutil-wttrin.el with shared fixtures and macros
  (testutil-wttrin-with-clean-weather-buffer,
  testutil-wttrin-mock-http-response, sample ANSI/weather constants)
- Consolidate cache tests: port unique tests from cleanup-cache-constants
  and cleanup-cache-refactored into cleanup-cache-if-needed, delete
  obsolete files
- Extract startup-delay tests into dedicated file
- Add setup/teardown and (require 'testutil-wttrin) to all test files
- Rename all 160 tests to follow
  test-&lt;module&gt;-&lt;category&gt;-&lt;scenario&gt;-&lt;expected-result&gt; convention
- Rename integration test file and add detailed docstrings
- Update Makefile glob to discover new integration test naming pattern

Co-Authored-By: Claude Opus 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>fix(wttrin): Fix ANSI color rendering on fresh Emacs launch</title>
<updated>2025-11-05T01:21:34+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2025-11-05T01:21:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/emacs-wttrin/commit/?id=7673e72ed4dc4af9c3db9a5962c4673bd1ce90e3'/>
<id>urn:sha1:7673e72ed4dc4af9c3db9a5962c4673bd1ce90e3</id>
<content type='text'>
  Critical bug fix: On fresh Emacs launch, weather displayed with only
  double quotes colored blue, all other text white. Pressing 'g' to
  refresh brought colors back.

  Root cause: wttrin-mode (derived mode) calls kill-all-local-variables
  internally. The code was setting xterm-color--state buffer-local BEFORE
  calling wttrin-mode, so the state was immediately wiped out. On refresh,
  the mode was already active (no-op), so the state survived.

  Fix: Call wttrin-mode FIRST, then set buffer-local variables after.
  This ensures kill-all-local-variables runs before we set any state.

  Changes:
  - Reorder initialization in wttrin--display-weather (wttrin.el:277-285)
  - Add regression tests for mode initialization order (2 new tests)

  Test results: 65 tests, all passing
</content>
</entry>
</feed>
