diff options
| author | Craig Jennings <c@cjennings.net> | 2026-04-04 16:37:11 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-04-04 16:37:11 -0500 |
| commit | 5463f104165185501be9cd6f7458d1b0cad856de (patch) | |
| tree | 453cd364d6ec93325235037aab96158900f9271e /wttrin.el | |
| parent | 73c81a00a10766900318d86640249d1b54c6b351 (diff) | |
| download | emacs-wttrin-5463f104165185501be9cd6f7458d1b0cad856de.tar.gz emacs-wttrin-5463f104165185501be9cd6f7458d1b0cad856de.zip | |
fix: weather buffer shows location in lowercase
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.
Diffstat (limited to 'wttrin.el')
| -rw-r--r-- | wttrin.el | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -451,6 +451,10 @@ the generic error message." (require 'xterm-color) (setq-local xterm-color--state :char) (insert (wttrin--process-weather-content raw-string)) + ;; wttr.in returns location in lowercase — replace with user's casing + (goto-char (point-min)) + (when (re-search-forward "^Weather report: .*$" nil t) + (replace-match (concat "Weather report: " location-name))) (let ((staleness (wttrin--format-staleness-header location-name))) (when staleness (insert "\n" staleness))) |
