<feed xmlns='http://www.w3.org/2005/Atom'>
<title>emacs-wttrin/tests, branch v0.3.0</title>
<subtitle>Emacs frontend for Igor Chubin's wttr.in weather service
</subtitle>
<id>https://git.cjennings.net/emacs-wttrin/atom?h=v0.3.0</id>
<link rel='self' href='https://git.cjennings.net/emacs-wttrin/atom?h=v0.3.0'/>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/emacs-wttrin/'/>
<updated>2026-04-04T18:27:39+00:00</updated>
<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>
<entry>
<title>fix: mode-line tooltip shows location in lowercase</title>
<updated>2026-04-04T18:00:19+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-04-04T18:00:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/emacs-wttrin/commit/?id=25b760d805e98ff3c0f0f9b29f75a108fb1dce10'/>
<id>urn:sha1:25b760d805e98ff3c0f0f9b29f75a108fb1dce10</id>
<content type='text'>
wttr.in's %l format returns locations in lowercase (e.g.,
"new orleans, la") regardless of the query casing. Replace the API's
location prefix with the user's original wttrin-favorite-location
string at cache time so tooltips display what the user expects.
</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: extract mode-line icon and string helpers</title>
<updated>2026-04-04T17:42:46+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-04-04T17:42:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/emacs-wttrin/commit/?id=130bbc076b17f8a5a275bea00e5aa2a354baad49'/>
<id>urn:sha1:130bbc076b17f8a5a275bea00e5aa2a354baad49</id>
<content type='text'>
Add wttrin--make-emoji-icon and wttrin--set-mode-line-string to
eliminate three near-identical propertize blocks across
update-placeholder-error, set-placeholder, and update-display.

Reduces wttrin--mode-line-update-display from 40 lines to 25.
</content>
</entry>
<entry>
<title>fix: debug-wttrin-show-raw broken by async API change</title>
<updated>2026-04-04T17:34:34+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-04-04T17:34:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/emacs-wttrin/commit/?id=f33d7231fa7f9f11250a592e28601df6b8f564c7'/>
<id>urn:sha1:f33d7231fa7f9f11250a592e28601df6b8f564c7</id>
<content type='text'>
debug-wttrin-show-raw called wttrin--get-cached-or-fetch with 1 arg,
but the function now requires 2 (location + callback) since the async
refactor. Rewrote to use the callback pattern. Also handles nil
response gracefully.
</content>
</entry>
<entry>
<title>test: add 50 tests for untested functions; fix nil crash in save-debug-data</title>
<updated>2026-04-04T17:26:16+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-04-04T17:26:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/emacs-wttrin/commit/?id=ea5636c51361b86d132d647ee3548d208394878e'/>
<id>urn:sha1:ea5636c51361b86d132d647ee3548d208394878e</id>
<content type='text'>
Add 11 new test files covering wttrin--save-debug-data,
wttrin--buffer-cache-refresh, wttrin--mode-line-stop,
wttrin--mode-line-start, wttrin-query, wttrin-requery-force,
wttrin-mode-line-click, wttrin-mode-line-force-refresh,
wttrin-fetch-raw-string, wttrin-clear-cache, and wttrin-requery.

Fix bug in wttrin--save-debug-data where nil raw-string caused
(insert nil) crash — reachable when debug mode is on and fetch fails.

Refactor wttrin-requery: extract wttrin--requery-location so the
core kill-buffer-and-query logic is testable without mocking
completing-read.

267 tests total (was 217), all passing.
</content>
</entry>
</feed>
