<feed xmlns='http://www.w3.org/2005/Atom'>
<title>emacs-wttrin, branch main</title>
<subtitle>Emacs frontend for Igor Chubin's wttr.in weather service
</subtitle>
<id>https://git.cjennings.net/emacs-wttrin/atom?h=main</id>
<link rel='self' href='https://git.cjennings.net/emacs-wttrin/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/emacs-wttrin/'/>
<updated>2026-06-05T03:28:24+00:00</updated>
<entry>
<title>chore: gitignore editor backup files</title>
<updated>2026-06-05T03:28:24+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-06-05T03:28:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/emacs-wttrin/commit/?id=bdd3fc2bd57cd016c8cb701911660d9f09192daf'/>
<id>urn:sha1:bdd3fc2bd57cd016c8cb701911660d9f09192daf</id>
<content type='text'>
</content>
</entry>
<entry>
<title>chore: track inbox directory, ignore its contents</title>
<updated>2026-06-04T21:28:01+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-06-04T21:28:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/emacs-wttrin/commit/?id=c282995bc1c614590bdd3a356138c0a4e96dc270'/>
<id>urn:sha1:c282995bc1c614590bdd3a356138c0a4e96dc270</id>
<content type='text'>
</content>
</entry>
<entry>
<title>feat: support t for auto-detect via geolocation in wttrin-favorite-location</title>
<updated>2026-05-05T15:06:20+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-05T15:06:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/emacs-wttrin/commit/?id=541586e3ff0606afcf0581210a62c95f5ee65c71'/>
<id>urn:sha1:541586e3ff0606afcf0581210a62c95f5ee65c71</id>
<content type='text'>
Completes the three-mode configuration the favorite-location feature was always meant to have:

- nil      — disabled (default; unchanged)
- a string — explicit location (unchanged)
- t        — auto-detect via IP geolocation (NEW)

When the user sets `wttrin-favorite-location` to t, wttrin runs the geolocation lookup once on first use and caches the result for the session. Subsequent reads return the cached string. The lookup happens in the background via the existing `wttrin-geolocation-detect`, so Emacs startup is never blocked.

I added two private state vars (`wttrin--resolved-favorite-location`, `wttrin--favorite-location-pending`) and a resolver `wttrin--resolve-favorite-location` that maps the three modes onto a returned string or nil. When t is set and the cache is empty, the resolver kicks off the lookup and returns nil for that call — the next consumer tick after the callback completes gets the cached string. The pending flag prevents duplicate concurrent lookups when several consumers ask during the resolution window.

Five consumer call sites now go through the resolver instead of reading `wttrin-favorite-location` directly: `wttrin--mode-line-fetch-weather`, `wttrin-mode-line-click`, `wttrin-mode-line-force-refresh`, `wttrin--buffer-cache-refresh`, and `wttrin--mode-line-start`. Two display sites (the placeholder and error tooltips) use a new `wttrin--favorite-location-display-name` helper that returns "current location" while a t-mode lookup is pending, instead of showing the literal `t` to the user.

Tests cover the resolver across all three modes, including the pending state, the duplicate-suppression behavior, and detection-failure retry. Existing consumer tests stay green because the resolver returns the bound string unchanged when the variable is a string. One care: the test file requires wttrin-geolocation up front so cl-letf mocks of `wttrin-geolocation-detect` aren't undone by the resolver's lazy require — without that, the first run hit ipapi.co for real.

README documents the new mode under "Setting the Favorite Location from IP Geolocation".
</content>
</entry>
<entry>
<title>feat: add wttrin-display-options for wttr.in flag customization (closes #3)</title>
<updated>2026-05-05T14:48:13+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-05T14:48:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/emacs-wttrin/commit/?id=ec00dbe1c03527ec46a0faa20545a7acd382da84'/>
<id>urn:sha1:ec00dbe1c03527ec46a0faa20545a7acd382da84</id>
<content type='text'>
wttr.in accepts single-character flags appended to the URL that control what the report looks like — no Follow line (F), narrow output (n), quiet mode (q), forecast horizon (0/1/2), console-glyph mode (d), and so on. Until now wttrin always used the same default report shape with no way to opt into these.

Added a `wttrin-display-options` defcustom that takes a string of concatenated flags, e.g. "0Fq" for current weather only with no Follow line and no header. The flags get appended to every request via `wttrin--build-url`. The defcustom defaults to nil so existing users see no change.

I excluded `A` and `T` from the recommended set in the docstring since wttrin needs ANSI output for the xterm-color rendering to produce the colored glyphs. The user could still pass them, but the docstring nudges them away.

Tests cover the normal cases (single, multi-flag, with and without unit system), the boundaries (nil and empty string both leave the URL unchanged from baseline, single character works), and a sanity check that the new flags slot in after the always-on `A`. Existing build-url tests stay green because they don't bind the new variable, and the default is nil.

Also added `.claude/` to .gitignore — the scheduled-tasks lockfile from local wakeup scheduling shouldn't be tracked.
</content>
</entry>
<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>docs: add CI and Coveralls badges to README</title>
<updated>2026-05-05T14:31:32+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-05T14:31:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/emacs-wttrin/commit/?id=14195e10b01fec3d9ded6e664a416c5cf3d33cc9'/>
<id>urn:sha1:14195e10b01fec3d9ded6e664a416c5cf3d33cc9</id>
<content type='text'>
Both badges point at the GitHub mirror, which is where the workflow runs and where the coverage gets reported. The CI badge reflects the latest run on `main`. The Coveralls badge tracks the most recent coverage upload from that branch.
</content>
</entry>
<entry>
<title>ci: upload coverage to Coveralls</title>
<updated>2026-05-05T14:29:39+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-05T14:29:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/emacs-wttrin/commit/?id=8e15315aa47f2ffbf3624ea67a68b7a5f80b2a7f'/>
<id>urn:sha1:8e15315aa47f2ffbf3624ea67a68b7a5f80b2a7f</id>
<content type='text'>
Added a step to the coverage job that uploads `.coverage/simplecov.json` to Coveralls via `coverallsapp/github-action@v2`. The token is read from the `COVERALLS_REPO_TOKEN` repo secret. The step is set to `continue-on-error: true` so a Coveralls outage doesn't block the build, and the artifact upload stays in place as a fallback for debugging.

`run-coverage-file.el` is unchanged. Undercover still produces simplecov JSON locally and on CI; the action handles the upload to coveralls.io with the right CI metadata.
</content>
</entry>
<entry>
<title>ci: add github actions for tests, lint, and coverage</title>
<updated>2026-05-05T10:30:32+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-05-05T10:30:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/emacs-wttrin/commit/?id=4414d9e4d3c1a3113e38353e38ec11d6de6ba8d8'/>
<id>urn:sha1:4414d9e4d3c1a3113e38353e38ec11d6de6ba8d8</id>
<content type='text'>
Tests run across an Emacs version matrix (26.3, 27.2, 28.2, 29.4, snapshot) on every push to main and every PR. Lint and coverage run once each on the latest stable Emacs.

The coverage job runs `make coverage`, prints the per-file and overall percentages via `scripts/coverage-summary.py`, and uploads the simplecov JSON as a build artifact (30-day retention). I'm leaving the artifact-only path in place for now and we'll wire up Coveralls in a follow-up once the repo is registered there.

The matrix floor is 26.3 even though Package-Requires says 24.4. The setup-emacs action doesn't reliably support 24.x or early 25.x anymore, and the recent if-let find shows we hadn't actually been testing the stated minimum. Honest CI floor here is more useful than an aspirational one.
</content>
</entry>
<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>
</feed>
