<feed xmlns='http://www.w3.org/2005/Atom'>
<title>emacs-wttrin/wttrin-debug.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-05T10:20:44+00:00</updated>
<entry>
<title>refactor: rename debug-wttrin-* commands to wttrin-debug-* with obsolete aliases</title>
<updated>2026-05-05T10:20:44+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-05T10:20:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/emacs-wttrin/commit/?id=35131cb72c08c657d2a3389338d0c049d57e69bd'/>
<id>urn:sha1:35131cb72c08c657d2a3389338d0c049d57e69bd</id>
<content type='text'>
The four interactive commands in `wttrin-debug.el` used `debug-wttrin-` as their prefix instead of the package's `wttrin-debug-` prefix. package-lint flags this as a convention violation, and it makes M-x discovery slightly less consistent for users.

Renamed:
- `debug-wttrin-show-raw`   -&gt; `wttrin-debug-show-raw`
- `debug-wttrin-enable`     -&gt; `wttrin-debug-enable`
- `debug-wttrin-disable`    -&gt; `wttrin-debug-disable`
- `debug-wttrin-mode-line`  -&gt; `wttrin-debug-mode-line`

The old names stay available as `define-obsolete-function-alias` entries marked since 0.4.0, so anyone with a keybinding or `(call-interactively 'debug-wttrin-enable)` in their config keeps working. The byte-compiler will emit an obsolescence warning to nudge migration. Aliases will be removed in a future release.

Internal caller `wttrin--debug-mode-line-info` now invokes the new name. Test files renamed to match (`test-debug-wttrin-*.el` -&gt; `test-wttrin-debug-*.el`); inside each, ert-deftest names and function calls were updated.

Added `tests/test-wttrin-debug-aliases.el` to verify each old name resolves via `indirect-function` to the new name and carries `byte-obsolete-info` with the expected target and "0.4.0" version.
</content>
</entry>
<entry>
<title>fix: drop if-let and personal-config reference in debug-wttrin-mode-line</title>
<updated>2026-05-05T10:17:39+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-05T10:17:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/emacs-wttrin/commit/?id=306c4ea1dd07de0d862c0943aeb8b7e170a1b343'/>
<id>urn:sha1:306c4ea1dd07de0d862c0943aeb8b7e170a1b343</id>
<content type='text'>
`if-let` requires Emacs 25.1, but the package declares (emacs "24.4") in Package-Requires. Replaced with `let` + `if` so the debug module loads on the stated minimum.

Also dropped the `cj/modeline-major-mode` branch. That symbol is from my personal Emacs config, so the conditional was effectively dead code for anyone else and a confusing reference in a published package. The diagnostic now always shows the formatted mode-name, which is useful for everyone.
</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: clean byte-compilation warnings</title>
<updated>2026-04-04T19:14:39+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-04-04T19:14:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/emacs-wttrin/commit/?id=88a66244fd613662ee7d5d3a0ad4394cfafdb521'/>
<id>urn:sha1:88a66244fd613662ee7d5d3a0ad4394cfafdb521</id>
<content type='text'>
Move define-obsolete-variable-alias before its referent defcustom to
fix "alias should be declared before its referent" warning. Add
defvar for wttrin--force-refresh in wttrin-debug.el so the
byte-compiler knows the dynamic variable is intentional.
</content>
</entry>
<entry>
<title>doc: improve source comments for senior developer audience</title>
<updated>2026-04-04T18:38:57+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-04-04T18:38:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/emacs-wttrin/commit/?id=8f89387201ed0cc7ddc5a758079a52a2ce12fe68'/>
<id>urn:sha1:8f89387201ed0cc7ddc5a758079a52a2ce12fe68</id>
<content type='text'>
Remove obvious comments that restate what the code does ("save debug
data if enabled", "temporarily allow editing", "align buffer to top").
Add comments explaining non-obvious decisions: why risky-local-variable
is needed, why user-agent is curl, what wttr.in format codes mean,
what the emoji extraction regex matches, and why after-init-time
matters. Fix stale docstrings that no longer match the no-op stub
pattern.
</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>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>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>refactor: debug: route all debug output to debug log instead of Messages</title>
<updated>2025-11-08T22:58:14+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2025-11-08T22:58:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/emacs-wttrin/commit/?id=c47f1d42abbb25af583384a3cb0ca17e8bcd61df'/>
<id>urn:sha1:c47f1d42abbb25af583384a3cb0ca17e8bcd61df</id>
<content type='text'>
- Remove (message ...) call from wttrin--debug-log function
- Replace 9 debug message calls in wttrin.el with wttrin--debug-log
- All debug output now goes to debug log for review with M-x wttrin-debug-show-log
- User-facing error messages preserved (network errors, processing errors)
- Updated docstring to clarify messages are stored for later review
</content>
</entry>
<entry>
<title>refactor: Improve cache cleanup clarity and add input validation</title>
<updated>2025-11-08T19:20:18+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2025-11-08T19:16:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/emacs-wttrin/commit/?id=b6761ed66012fcf3e98aa252582aaf03b2b85c12'/>
<id>urn:sha1:b6761ed66012fcf3e98aa252582aaf03b2b85c12</id>
<content type='text'>
Cache Refactorings:
- Extract wttrin--get-cache-entries-by-age helper function
- Refactor wttrin--cleanup-cache-if-needed to use helper
- Improves code clarity with descriptive variable names
- Makes cache logic independently testable
- Add 15 new tests (8 for helper, 7 for refactored cleanup)

Input Validation:
- Add range validation to wttrin-mode-line-startup-delay (1-10 seconds)
- Prevents invalid values (0, negative, or excessive delays)
- Uses restricted-sexp type for enforcement

Test Fixes:
- Fix debug function naming (use public wttrin-debug-clear-log)
- Ensure wttrin-debug module loads in test setup
- Make mocks synchronous for batch mode compatibility
- Update test expectations to match actual debug messages
- Fix startup delay test to check defcustom default value

Linter/Compiler Fixes:
- Add declare-function for wttrin--debug-log
- Add defvar/declare-function in wttrin-debug.el
- Fix docstring line lengths (wrap at 80 chars)
- Fix checkdoc warnings (imperative mood, escaping)
- Disambiguate temporary-file-directory reference

All 165 tests passing. Clean byte-compile, package-lint, checkdoc.
</content>
</entry>
</feed>
