diff options
| author | Craig Jennings <c@cjennings.net> | 2026-04-04 13:27:39 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-04-04 13:27:39 -0500 |
| commit | 0bbed459fb60f1b9ebe0e137527aa44b75c4835e (patch) | |
| tree | f6117366fd616127997a2510ba984954e8b4a090 /wttrin-debug.el | |
| parent | de99a2930bbe65d7c2ea04656caa18823068c182 (diff) | |
| download | emacs-wttrin-0bbed459fb60f1b9ebe0e137527aa44b75c4835e.tar.gz emacs-wttrin-0bbed459fb60f1b9ebe0e137527aa44b75c4835e.zip | |
fix: debug-wttrin-show-raw serves cached data instead of fetching
A debug command should show what the API currently returns, not a
cached copy. Bind wttrin--force-refresh to t so the fetch always
bypasses the cache.
Diffstat (limited to 'wttrin-debug.el')
| -rw-r--r-- | wttrin-debug.el | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/wttrin-debug.el b/wttrin-debug.el index 57de3a4..6bb281f 100644 --- a/wttrin-debug.el +++ b/wttrin-debug.el @@ -39,10 +39,12 @@ ;;;###autoload (defun debug-wttrin-show-raw (location) "Fetch and display raw wttr.in data for LOCATION with line numbers. -This is useful for debugging header parsing issues." +This is useful for debugging header parsing issues. +Always fetches fresh data from the API, bypassing cache." (interactive "sLocation: ") - (wttrin--get-cached-or-fetch - location + (let ((wttrin--force-refresh t)) + (wttrin--get-cached-or-fetch + location (lambda (raw-string) (with-current-buffer (get-buffer-create "*wttrin-debug*") (erase-buffer) @@ -56,7 +58,7 @@ This is useful for debugging header parsing issues." (setq line-num (1+ line-num)) (forward-line 1))) (goto-char (point-min)) - (switch-to-buffer (current-buffer)))))) + (switch-to-buffer (current-buffer))))))) ;;;###autoload (defun debug-wttrin-enable () |
