diff options
| author | Craig Jennings <c@cjennings.net> | 2025-11-04 17:32:08 -0600 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2025-11-04 17:32:08 -0600 |
| commit | 541c61a403e01922a7569f5e23c25eba08fce427 (patch) | |
| tree | 4e923a8d58026658bb37d2eecf6855922a531cfe /debug-wttrin.el | |
| parent | 18b89fbdf3b5b13ccfd0d3a09f6bb2925addbab2 (diff) | |
refactor:debug: Rename and enhance wttrin debug functions
- Reorganized debugging utilities by renaming `debug-wttrin.el` to
`wttrin-debug.el` and adding new functions.
- The updated module now supports `debug-wttrin-mode-line` for
detailed mode-line diagnostics and introduces customizable mode-line
weather display with new configuration options.
- Additionally, extended debugging capabilities ensure concise
emoji-based weather info and tooltip data management, incorporated with auto-loaded conditional debug logic.
Diffstat (limited to 'debug-wttrin.el')
| -rw-r--r-- | debug-wttrin.el | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/debug-wttrin.el b/debug-wttrin.el deleted file mode 100644 index 8b8798b..0000000 --- a/debug-wttrin.el +++ /dev/null @@ -1,52 +0,0 @@ -;;; debug-wttrin.el --- Debug helper for wttrin -*- lexical-binding: t -*- -;; -;; This file provides utilities for debugging wttrin display issues. -;; -;;; Commentary: -;; -;; To enable debug mode: -;; (setq wttrin-debug t) -;; -;; This will save raw weather responses to timestamped files in your -;; temp directory for bug reports. -;; -;; To view raw data with line numbers for development: -;; M-x debug-wttrin-show-raw RET <location> RET -;; -;;; Code: - -(require 'wttrin) - -(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." - (interactive "sLocation: ") - (let ((raw-string (wttrin--get-cached-or-fetch location))) - (with-current-buffer (get-buffer-create "*wttrin-debug*") - (erase-buffer) - (insert raw-string) - (goto-char (point-min)) - (let ((line-num 1)) - (while (not (eobp)) - (beginning-of-line) - (insert (format "%2d: " line-num)) - (setq line-num (1+ line-num)) - (forward-line 1))) - (goto-char (point-min)) - (switch-to-buffer (current-buffer))))) - -(defun debug-wttrin-enable () - "Enable wttrin debug mode. -Raw weather data will be saved to timestamped files for bug reports." - (interactive) - (setq wttrin-debug t) - (message "Wttrin debug mode enabled. Raw data will be saved to: %s" temporary-file-directory)) - -(defun debug-wttrin-disable () - "Disable wttrin debug mode." - (interactive) - (setq wttrin-debug nil) - (message "Wttrin debug mode disabled")) - -(provide 'debug-wttrin) -;;; debug-wttrin.el ends here |
