From d05a8c84310ad3122c1a38f113bd93bca3f7f58a Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Tue, 4 Nov 2025 09:09:28 -0600 Subject: feat(emacs): Add asynchronous weather fetching to wttrin Introduce asynchronous data fetching to the wttrin.el Emacs package. This enhancement avoids blocking Emacs during data retrieval by using `url-retrieve` for async calls. The behavior is controlled via a new customizable variable `wttrin-use-async`. Tests have been added for the new async behavior to ensure proper functionality.feat:makefile): Add package initialization for Emacs batch Enhance Makefile with package support by loading and initializing MELPA archive before validating and compiling, ensuring required packages are available during these operations. feat(tests): Add unit tests for `wttrin--display-weather` Introduce comprehensive tests for `wttrin--display-weather` function to validate buffer creation, content, keybindings, and error handling. --- Makefile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 8a43771..fdedbf5 100644 --- a/Makefile +++ b/Makefile @@ -163,7 +163,11 @@ validate-parens: validate: @echo "Loading wttrin.el to verify compilation..." - @$(EMACS_BATCH) -L $(PROJECT_ROOT) \ + @$(EMACS_BATCH) \ + --eval "(require 'package)" \ + --eval "(add-to-list 'package-archives '(\"melpa\" . \"https://melpa.org/packages/\") t)" \ + --eval "(package-initialize)" \ + -L $(PROJECT_ROOT) \ --eval "(condition-case err \ (progn \ (load-file \"$(MAIN_FILE)\") \ @@ -176,7 +180,11 @@ validate: compile: @echo "Byte-compiling wttrin.el..." - @$(EMACS_BATCH) -L $(PROJECT_ROOT) \ + @$(EMACS_BATCH) \ + --eval "(require 'package)" \ + --eval "(add-to-list 'package-archives '(\"melpa\" . \"https://melpa.org/packages/\") t)" \ + --eval "(package-initialize)" \ + -L $(PROJECT_ROOT) \ --eval "(progn \ (setq byte-compile-error-on-warn nil) \ (batch-byte-compile))" $(MAIN_FILE) -- cgit v1.2.3