From ad9099f489b5d0ab89d23566c386c915cd92db06 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sat, 8 Nov 2025 12:40:15 -0600 Subject: docs: Use :preface for wttrin-debug instead of external setq MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update README to show wttrin-debug being set in :preface section of use-package declarations. This is cleaner and follows standard use-package conventions better than requiring users to set variables outside the declaration. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- README.org | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'README.org') diff --git a/README.org b/README.org index fb8b085..275a51e 100644 --- a/README.org +++ b/README.org @@ -240,15 +240,15 @@ You can customize several aspects of the mode-line weather display: If wttrin isn't working as expected, enable debug mode to see detailed logging of what's happening. *** Enabling Debug Mode -*Important:* The `wttrin-debug` variable must be set *before* wttrin loads, as it's checked at load time to decide whether to load the debug module. +*Important:* The `wttrin-debug` variable must be set *before* wttrin loads, as it's checked at load time to decide whether to load the debug module. Use `:preface` to set it before the package loads. **** For use-package installations: #+begin_src emacs-lisp - ;; Set debug BEFORE the use-package declaration - (setq wttrin-debug t) - (use-package wttrin :ensure t + :preface + ;; Set debug BEFORE wttrin loads + (setq wttrin-debug t) :custom (wttrin-mode-line-favorite-location "Your City")) #+end_src @@ -266,14 +266,13 @@ If wttrin isn't working as expected, enable debug mode to see detailed logging o #+begin_src emacs-lisp (add-to-list 'load-path "/path/to/emacs-wttrin") - ;; Set debug BEFORE (require 'wttrin) - (setq wttrin-debug t) - (use-package wttrin :preface + ;; Load dependencies and set debug BEFORE wttrin loads (use-package xterm-color :demand t) - ;; ... rest of config - ) + (setq wttrin-debug t) + :custom + (wttrin-mode-line-favorite-location "Your City")) #+end_src *** Viewing Debug Output -- cgit v1.2.3