From 1f57189ffbe4f039ea213918c97d0a9496b4db7b Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Tue, 5 May 2026 09:39:09 -0500 Subject: refactor: clear package-lint warnings for MELPA prep MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I worked through the package-lint backlog and got it to zero. Five changes: 1. Renamed six interactive debug commands from the private `chime--debug-*' prefix to the public `chime-debug-*' form. They were always M-x targets, so the private prefix was just wrong. The autoload cookies stay because public commands SHOULD be autoloaded. README, docstring references in chime.el, and the matching tests follow the rename. 2. Dropped `Version', `Package-Requires', and `Keywords' headers from chime-org-contacts.el. Auxiliary files in a multi-file package shouldn't carry their own metadata — package-lint flags it as an error because the headers have no effect outside the main file. The main file (chime.el) already declares the chime package's metadata. 3. Dropped `Keywords' from chime-debug.el for the same reason. 4. Dropped the auto-loader for the optional chime-org-contacts integration from chime.el. The old code used `with-eval-after-load 'org-capture' to pull the file in, which package-lint flags as a configuration pattern that doesn't belong in a package. Users who want the integration now require it themselves; the README shows both the plain `with-eval-after-load' pattern and the `use-package :after' form. chime-org-contacts.el's internal `with-eval-after-load' went away too — by the time the user has required the file, they've already gated it on org-capture being loaded, so the inner check is redundant. 5. Dropped the redundant `with-eval-after-load' from chime-org-contacts.el's activation block. The setup function still guards on `(boundp 'org-capture-templates)' so it's safe to require either order. Behavioral note: this is a small breaking change for anyone whose config relied on the auto-load. The README change spells out the migration path. --- tests/test-chime-debug-functions.el | 40 ++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'tests') diff --git a/tests/test-chime-debug-functions.el b/tests/test-chime-debug-functions.el index cef9e4c..a01fd5f 100644 --- a/tests/test-chime-debug-functions.el +++ b/tests/test-chime-debug-functions.el @@ -19,8 +19,8 @@ ;;; Commentary: -;; Tests for debug functions: chime--debug-dump-events, chime--debug-dump-tooltip, -;; and chime--debug-config. These tests verify that debug functions work correctly +;; Tests for debug functions: chime-debug-dump-events, chime-debug-dump-tooltip, +;; and chime-debug-config. These tests verify that debug functions work correctly ;; and handle edge cases gracefully. ;;; Code: @@ -46,10 +46,10 @@ (chime-delete-test-base-dir) (setq chime--upcoming-events nil)) -;;; Tests for chime--debug-dump-events +;;; Tests for chime-debug-dump-events (ert-deftest test-chime-debug-dump-events-normal-with-events () - "Test that chime--debug-dump-events dumps events to *Messages* buffer." + "Test that chime-debug-dump-events dumps events to *Messages* buffer." (test-chime-debug-functions-setup) (unwind-protect (let* ((now (test-time-today-at 14 0)) @@ -67,7 +67,7 @@ (let ((inhibit-read-only t)) (erase-buffer))) ;; Call debug function - (chime--debug-dump-events) + (chime-debug-dump-events) ;; Verify output in *Messages* buffer (with-current-buffer "*Messages*" (let ((content (buffer-string))) @@ -77,7 +77,7 @@ (test-chime-debug-functions-teardown))) (ert-deftest test-chime-debug-dump-events-boundary-no-events () - "Test that chime--debug-dump-events handles no events gracefully." + "Test that chime-debug-dump-events handles no events gracefully." (test-chime-debug-functions-setup) (unwind-protect (progn @@ -85,14 +85,14 @@ (setq chime--upcoming-events nil) ;; Should not error (should-not (condition-case nil - (progn (chime--debug-dump-events) nil) + (progn (chime-debug-dump-events) nil) (error t)))) (test-chime-debug-functions-teardown))) -;;; Tests for chime--debug-dump-tooltip +;;; Tests for chime-debug-dump-tooltip (ert-deftest test-chime-debug-dump-tooltip-normal-with-events () - "Test that chime--debug-dump-tooltip dumps tooltip to *Messages* buffer." + "Test that chime-debug-dump-tooltip dumps tooltip to *Messages* buffer." (test-chime-debug-functions-setup) (unwind-protect (let* ((now (test-time-today-at 14 0)) @@ -110,7 +110,7 @@ (let ((inhibit-read-only t)) (erase-buffer))) ;; Call debug function - (chime--debug-dump-tooltip) + (chime-debug-dump-tooltip) ;; Verify output in *Messages* buffer (with-current-buffer "*Messages*" (let ((content (buffer-string))) @@ -120,7 +120,7 @@ (test-chime-debug-functions-teardown))) (ert-deftest test-chime-debug-dump-tooltip-boundary-no-events () - "Test that chime--debug-dump-tooltip handles no events gracefully." + "Test that chime-debug-dump-tooltip handles no events gracefully." (test-chime-debug-functions-setup) (unwind-protect (progn @@ -128,14 +128,14 @@ (setq chime--upcoming-events nil) ;; Should not error (should-not (condition-case nil - (progn (chime--debug-dump-tooltip) nil) + (progn (chime-debug-dump-tooltip) nil) (error t)))) (test-chime-debug-functions-teardown))) -;;; Tests for chime--debug-config +;;; Tests for chime-debug-config (ert-deftest test-chime-debug-config-normal-dumps-config () - "Test that chime--debug-config dumps configuration to *Messages* buffer." + "Test that chime-debug-config dumps configuration to *Messages* buffer." (test-chime-debug-functions-setup) (unwind-protect (let ((chime-enable-modeline t) @@ -147,7 +147,7 @@ (let ((inhibit-read-only t)) (erase-buffer))) ;; Call debug function - (chime--debug-config) + (chime-debug-config) ;; Verify output in *Messages* buffer (with-current-buffer "*Messages*" (let ((content (buffer-string))) @@ -161,7 +161,7 @@ (test-chime-debug-functions-teardown))) (ert-deftest test-chime-debug-config-boundary-no-agenda-files () - "Test that chime--debug-config handles empty org-agenda-files." + "Test that chime-debug-config handles empty org-agenda-files." (test-chime-debug-functions-setup) (unwind-protect (let ((org-agenda-files '())) @@ -171,7 +171,7 @@ (erase-buffer))) ;; Should not error (should-not (condition-case nil - (progn (chime--debug-config) nil) + (progn (chime-debug-config) nil) (error t))) ;; Verify output mentions 0 files (with-current-buffer "*Messages*" @@ -200,9 +200,9 @@ ;; Call all three debug functions - should not error (should-not (condition-case nil (progn - (chime--debug-dump-events) - (chime--debug-dump-tooltip) - (chime--debug-config) + (chime-debug-dump-events) + (chime-debug-dump-tooltip) + (chime-debug-config) nil) (error t)))))) (test-chime-debug-functions-teardown))) -- cgit v1.2.3