From f9449f6c8d4f5d174bea4a878632384f2b760c5f Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 13 Sep 2026 09:46:11 -0500 Subject: fix: match the F display flag case-sensitively wttrin--effective-display-options checked for an existing F with string-match-p, which honors case-fold-search. That defaults to t, so a lowercase f in wttrin-display-options read as F and the flag was never added. wttr.in flags are case-sensitive (q and Q differ), so I bound case-fold-search to nil inside the helper. The tests cover a lowercase f under both case-fold settings. They also pin that a non-string options value signals wrong-type-argument rather than building a bad URL. --- wttrin.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'wttrin.el') diff --git a/wttrin.el b/wttrin.el index 449fb80..bc67924 100644 --- a/wttrin.el +++ b/wttrin.el @@ -532,8 +532,11 @@ ERROR-MSG has no class." "Return the wttr.in display flags for the weather-buffer request. Starts from `wttrin-display-options' and appends the F flag (\"do not show the Follow line\") when `wttrin-hide-follow-line' is non-nil and F is not -already present, so the two controls compose without duplicating the flag." - (let ((opts (or wttrin-display-options ""))) +already present, so the two controls compose without duplicating the flag. +The match is case-sensitive, because wttr.in treats q and Q as +different flags." + (let ((opts (or wttrin-display-options "")) + (case-fold-search nil)) (if (and wttrin-hide-follow-line (not (string-match-p "F" opts))) (concat opts "F") opts))) -- cgit v1.2.3