From 5463f104165185501be9cd6f7458d1b0cad856de Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sat, 4 Apr 2026 16:37:11 -0500 Subject: 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. --- wttrin.el | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'wttrin.el') diff --git a/wttrin.el b/wttrin.el index b628b1c..2dc231d 100644 --- a/wttrin.el +++ b/wttrin.el @@ -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))) -- cgit v1.2.3