<feed xmlns='http://www.w3.org/2005/Atom'>
<title>emacs-wttrin/tests/test-wttrin--display-weather.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-06-28T08:11:45+00:00</updated>
<entry>
<title>fix: don't steal focus when an async weather response renders</title>
<updated>2026-06-28T08:11:45+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-06-28T08:11:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/emacs-wttrin/commit/?id=da7ee0841924dfbd91c9a944e0bfeff6903bd8a1'/>
<id>urn:sha1:da7ee0841924dfbd91c9a944e0bfeff6903bd8a1</id>
<content type='text'>
wttrin--display-weather ran switch-to-buffer from the async callback, so a
response arriving after the user moved to another buffer yanked them back to
*wttr.in*. It now renders with set-buffer; selecting the buffer is the
interactive command's job (wttrin-query already does it at invocation), so a
late response updates the buffer in place without changing the selected window.
</content>
</entry>
<entry>
<title>feat: add named-locations directory with display names</title>
<updated>2026-06-26T14:53:18+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-06-26T14:53:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/emacs-wttrin/commit/?id=55ee8158a1f85bb532a24d752f9ef409192a924c'/>
<id>urn:sha1:55ee8158a1f85bb532a24d752f9ef409192a924c</id>
<content type='text'>
A saved location carries a display name distinct from its query target ("Mom's House" maps to coordinates or an address), stored in a savehist-persisted wttrin-saved-locations alist. The name shows everywhere the place appears (picker, buffer header, mode-line tooltip) while wttr.in is still queried by the target.

Management commands wttrin-save-location, wttrin-rename-location, and wttrin-remove-location edit the directory, with refuse-on-collision rename and a favorite-fallback warning on remove. In the weather buffer, s/r/x reach those commands and d names a detected location before promoting it to the default. The footer is two columns: a "This view" column (another, refresh, quit) and a "Saved locations" column (save, make default, rename, remove). The buffer anchors to the top so the forecast isn't scrolled out of view in a short window.

The mode-line follows favorite changes immediately rather than waiting for the next scheduled fetch, and its hover tooltip shows the saved name instead of the raw query. History holds named entries only: raw coordinate detections and saved names stay out of it.
</content>
</entry>
<entry>
<title>test: extract message-capture helper into testutil</title>
<updated>2026-06-21T12:31:24+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-06-21T12:31:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/emacs-wttrin/commit/?id=55c60f025e834c6bc60523542644ac0ec03d035c'/>
<id>urn:sha1:55c60f025e834c6bc60523542644ac0ec03d035c</id>
<content type='text'>
Five test files hand-rolled the same scaffolding to capture the echo-area message: a nil-initialized var, a cl-letf on message, and a lambda that stored the formatted string. Centralize it as testutil-wttrin-with-captured-message, which binds the var and captures the last message shown.

Behavior is unchanged. The full suite stays green. Sites that mock message for a different reason are left alone: the ones that silence it with #'ignore, and the one that accumulates every message into a list.
</content>
</entry>
<entry>
<title>fix: weather ASCII art wraps when window is narrow</title>
<updated>2026-04-04T21:41:02+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-04-04T21:41:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/emacs-wttrin/commit/?id=797fa7a6f51211b1218a2c08ce57dbbab835610c'/>
<id>urn:sha1:797fa7a6f51211b1218a2c08ce57dbbab835610c</id>
<content type='text'>
Enable truncate-lines in wttrin-mode so the fixed-width weather art
clips at the window edge instead of wrapping and breaking the layout.
</content>
</entry>
<entry>
<title>fix: weather buffer shows location in lowercase</title>
<updated>2026-04-04T21:37:11+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-04-04T21:37:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/emacs-wttrin/commit/?id=5463f104165185501be9cd6f7458d1b0cad856de'/>
<id>urn:sha1:5463f104165185501be9cd6f7458d1b0cad856de</id>
<content type='text'>
wttr.in returns "Weather report: new orleans, la" regardless of
query casing. Replace the lowercase location on the header line
with the user's original string after rendering.
</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>
<entry>
<title>feat(emacs): Add asynchronous weather fetching to wttrin</title>
<updated>2025-11-04T15:09:28+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2025-11-04T15:09:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/emacs-wttrin/commit/?id=d05a8c84310ad3122c1a38f113bd93bca3f7f58a'/>
<id>urn:sha1:d05a8c84310ad3122c1a38f113bd93bca3f7f58a</id>
<content type='text'>
Introduce asynchronous data fetching to the wttrin.el Emacs package.
This enhancement avoids blocking Emacs during data retrieval by
using `url-retrieve` for async calls. The behavior is controlled via
a new customizable variable `wttrin-use-async`. Tests have been
added for the new async behavior to ensure proper functionality.feat:makefile): Add package initialization for Emacs batch

Enhance Makefile with package support by loading and initializing
MELPA archive before validating and compiling, ensuring required
packages are available during these operations.

feat(tests): Add unit tests for `wttrin--display-weather`

Introduce comprehensive tests for `wttrin--display-weather` function
to validate buffer creation, content, keybindings, and error
handling.
</content>
</entry>
</feed>
