<feed xmlns='http://www.w3.org/2005/Atom'>
<title>emacs-wttrin/tests, branch v0.3.2</title>
<subtitle>Emacs frontend for Igor Chubin's wttr.in weather service
</subtitle>
<id>https://git.cjennings.net/emacs-wttrin/atom?h=v0.3.2</id>
<link rel='self' href='https://git.cjennings.net/emacs-wttrin/atom?h=v0.3.2'/>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/emacs-wttrin/'/>
<updated>2026-04-26T22:59:59+00:00</updated>
<entry>
<title>test: regression lock for nil :foreground in --make-emoji-icon</title>
<updated>2026-04-26T22:59:59+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-04-26T22:59:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/emacs-wttrin/commit/?id=8f3c770e062a9aefec17f6b5f4f0a5ed927ac603'/>
<id>urn:sha1:8f3c770e062a9aefec17f6b5f4f0a5ed927ac603</id>
<content type='text'>
When wttrin-mode-line-emoji-font is set and the cache is fresh, --make-emoji-icon was emitting a face plist of the form (:family ... :height 1.0 :foreground nil). Emacs validates faces on every redisplay, so a single fresh-cache state produced hundreds of "Invalid face attribute :foreground nil" warnings in *Messages*.

The new boundary test asserts the face plist omits :foreground entirely when the caller passes nil. The assertion uses plist-member, not plist-get. plist-get returns nil for both a missing key and a present key bound to nil. That's the exact distinction Emacs's redisplay validator cares about.
</content>
</entry>
<entry>
<title>feat: add IP geolocation command for setting wttrin-favorite-location</title>
<updated>2026-04-22T05:07:51+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-04-22T05:07:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/emacs-wttrin/commit/?id=9958ec4c4396ae8435f7e1818ff383c05df47a14'/>
<id>urn:sha1:9958ec4c4396ae8435f7e1818ff383c05df47a14</id>
<content type='text'>
Lets users set `wttrin-favorite-location` by IP lookup instead of typing a city by hand. `M-x wttrin-set-location-from-geolocation` runs the lookup, shows the detected "City, Region" in a yes/no prompt, and on confirmation sets the variable for the session. The docstring points at `M-x customize-save-variable` for persistence across restarts.

The new `wttrin-geolocation.el` module provides the provider layer. Three providers come built in: ipapi.co (the default), ipinfo.io, and ipwho.is. All three are HTTPS, need no API key, and have free tiers large enough for interactive use. The module has three layers. Pure JSON parsers handle the per-provider quirks: ipapi's `error: true` flag, ipwho.is's `success: false` flag, ipinfo's HTTP-status-only signalling. A small fetch helper extracts the HTTP body. `wttrin-geolocation-detect` wires them together and calls back with "City, Region" on success, or nil on any failure (network error, HTTP 4xx or 5xx, malformed response, rate-limit signal).

Providers live in an alist keyed by symbol, with plist values for :name, :url, and :parser. To use a different provider, push an entry onto `wttrin-geolocation--providers` and select it via `wttrin-geolocation-provider`. No code change needed.

README gains a subsection under Mode-line Weather Display covering the command, how to persist the result, provider selection with free-tier limits, and the accuracy caveat for VPN or mobile-hotspot users.

39 new tests across the parser layer (10 ipapi, 6 ipinfo, 6 ipwhois), fetch-and-dispatch (11), and interactive command (6). Each suite covers Normal, Boundary, and Error categories. Tests mock `url-retrieve` and `yes-or-no-p` at their boundaries and run the real extract-and-parse pipeline underneath. Test suite: 333 → 373 passing.
</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>feat: specific error messages for fetch failures</title>
<updated>2026-04-04T21:32:16+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-04-04T21:32:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/emacs-wttrin/commit/?id=73c81a00a10766900318d86640249d1b54c6b351'/>
<id>urn:sha1:73c81a00a10766900318d86640249d1b54c6b351</id>
<content type='text'>
Add HTTP status code checking (wttrin--extract-http-status) and pass
error descriptions through the callback chain so users see "Location
not found (HTTP 404)" or "Network error — check your connection"
instead of the generic "Perhaps the location was misspelled?" for
every failure.

Also fix pre-existing bug where the condition-case error handler in
extract-response-body killed an unrelated buffer after unwind-protect
already cleaned up.

330 tests (was 307), all passing.
</content>
</entry>
<entry>
<title>fix: debug-wttrin-show-raw serves cached data instead of fetching</title>
<updated>2026-04-04T18:27:39+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-04-04T18:27:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/emacs-wttrin/commit/?id=0bbed459fb60f1b9ebe0e137527aa44b75c4835e'/>
<id>urn:sha1:0bbed459fb60f1b9ebe0e137527aa44b75c4835e</id>
<content type='text'>
A debug command should show what the API currently returns, not a
cached copy. Bind wttrin--force-refresh to t so the fetch always
bypasses the cache.
</content>
</entry>
<entry>
<title>fix: emoji dimming can disagree with tooltip staleness</title>
<updated>2026-04-04T18:26:10+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-04-04T18:26:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/emacs-wttrin/commit/?id=de99a2930bbe65d7c2ea04656caa18823068c182'/>
<id>urn:sha1:de99a2930bbe65d7c2ea04656caa18823068c182</id>
<content type='text'>
The emoji face (dimmed/normal) was frozen at the last update-display
call, but the tooltip computes staleness dynamically. Between
refreshes, data could cross the stale threshold — tooltip says "Stale"
while the emoji is still normal.

Track the rendered staleness state. When the tooltip detects a
transition, trigger a re-render so the emoji dimming matches.
</content>
</entry>
<entry>
<title>fix: cache timestamp reflects request time, not response time</title>
<updated>2026-04-04T18:24:01+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-04-04T18:24:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/emacs-wttrin/commit/?id=752e2f825b1ee3eb513e27f2c03bcaef30eec767'/>
<id>urn:sha1:752e2f825b1ee3eb513e27f2c03bcaef30eec767</id>
<content type='text'>
float-time was captured in the outer let* before the async fetch.
The callback used this stale value, making cache entries appear
slightly older than they are. Move the float-time call into the
callback so the timestamp reflects when the data actually arrived.
</content>
</entry>
<entry>
<title>fix: validate-weather-data corrupts match data</title>
<updated>2026-04-04T18:21:46+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-04-04T18:21:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/emacs-wttrin/commit/?id=821c7c1ded6bef400dcfda9aec27832f116ce369'/>
<id>urn:sha1:821c7c1ded6bef400dcfda9aec27832f116ce369</id>
<content type='text'>
string-match modifies global match data as a side effect. A predicate
should not do this. Use string-match-p instead.
</content>
</entry>
<entry>
<title>fix: mode-line tooltip always shows "Updated just now"</title>
<updated>2026-04-04T18:07:50+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-04-04T18:07:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/emacs-wttrin/commit/?id=f526cf641181e9cdb533a1f8a278de1fad49ca25'/>
<id>urn:sha1:f526cf641181e9cdb533a1f8a278de1fad49ca25</id>
<content type='text'>
The tooltip was a static string computed at fetch time. Since every
successful fetch sets the cache timestamp to now and immediately
renders the tooltip, it was always "just now".

Extract wttrin--mode-line-tooltip as a named function that computes
age from the cache at call time. Set help-echo to this function so
Emacs invokes it on hover, producing an accurate age like
"Updated 12 minutes ago".
</content>
</entry>
</feed>
