diff options
| author | Craig Jennings <c@cjennings.net> | 2025-11-04 19:21:34 -0600 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2025-11-04 19:21:34 -0600 |
| commit | 7673e72ed4dc4af9c3db9a5962c4673bd1ce90e3 (patch) | |
| tree | 555ad7fdfbcf852a37f142063cd18c88032a4499 /README.org | |
| parent | 629d09a69d4fbb75f0d36fb44d750c515873834d (diff) | |
fix(wttrin): Fix ANSI color rendering on fresh Emacs launch
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
Diffstat (limited to 'README.org')
| -rw-r--r-- | README.org | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -88,7 +88,7 @@ Simply use the keybinding you assigned, or run `M-x wttrin` to display the weath [[assets/location-menu.png]] -Choose one, or for a quick one-time weather check, type a new location and ⏎ . After the weather is displayed, you can press `g` to check another location or `q` to exit, just like it says in the buffer. +Choose one, or for a quick one-time weather check, type a new location and ⏎ . After the weather is displayed, you can press `a` to check another location, `g` to refresh, or `q` to quit. ** Customization Wttrin can be customized using the built-in Emacs Customize interface. To do this, type M-x customize ⏎ wttrin ⏎ and use the UI. However, it's more portable and reproducible to keep the customizations in your init file, so do that. |
