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. --- chime-debug.el | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'chime-debug.el') diff --git a/chime-debug.el b/chime-debug.el index bb57887..837c075 100644 --- a/chime-debug.el +++ b/chime-debug.el @@ -3,9 +3,11 @@ ;; Copyright (C) 2024-2026 Craig Jennings ;; Author: Craig Jennings -;; Keywords: notification alert org org-agenda debug ;; URL: https://github.com/cjennings/chime +;; This file is part of the chime package. Keywords live on the main file +;; (chime.el); auxiliary files don't repeat them per package-lint convention. + ;; This program is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or @@ -29,9 +31,9 @@ ;; (require 'chime) ;; ;; Available debug functions: -;; - `chime--debug-dump-events' - Show all stored upcoming events -;; - `chime--debug-dump-tooltip' - Show tooltip content -;; - `chime--debug-config' - Show complete configuration dump +;; - `chime-debug-dump-events' - Show all stored upcoming events +;; - `chime-debug-dump-tooltip' - Show tooltip content +;; - `chime-debug-config' - Show complete configuration dump ;; - `chime-debug-monitor-event-loading' - Monitor when events are first loaded ;; ;; All functions write to *Messages* buffer without cluttering echo area. @@ -47,7 +49,7 @@ ;; No need for (require 'chime) here ;;;###autoload -(defun chime--debug-dump-events () +(defun chime-debug-dump-events () "Dump all upcoming events to *Messages* buffer for debugging. Shows events stored in `chime--upcoming-events' with their times and titles." (interactive) @@ -74,7 +76,7 @@ Shows events stored in `chime--upcoming-events' with their times and titles." (message "Dumped %d events to *Messages* buffer" (length chime--upcoming-events)))) ;;;###autoload -(defun chime--debug-dump-tooltip () +(defun chime-debug-dump-tooltip () "Dump current tooltip content to *Messages* buffer for debugging. Shows the tooltip text that would appear when hovering over the modeline." (interactive) @@ -89,7 +91,7 @@ Shows the tooltip text that would appear when hovering over the modeline." (message "Dumped tooltip content to *Messages* buffer"))))) ;;;###autoload -(defun chime--debug-config () +(defun chime-debug-config () "Dump chime configuration and status to *Messages* buffer. Shows all relevant settings, agenda files, and current state." (interactive) @@ -259,7 +261,7 @@ ERROR-DATA is the error information from the async process." (setq chime--debug-async-start-time nil)) ;;;###autoload -(defun chime--debug-show-async-stats () +(defun chime-debug-show-async-stats () "Show statistics about async process performance." (interactive) (chime--log-silently "=== Chime Debug: Async Stats ===") @@ -299,7 +301,7 @@ ERROR-DATA is the error information from the async process." :not-loaded (nreverse not-loaded)))) ;;;###autoload -(defun chime--debug-dump-loaded-features () +(defun chime-debug-dump-loaded-features () "Dump which chime-related features are currently loaded. Useful for diagnosing lazy-loading issues." (interactive) @@ -327,7 +329,7 @@ Warns about slow processes and tracks statistics." (chime--debug-log-async-start))) (chime--log-silently "Chime debug: Async process monitoring enabled") - (message "Chime: Async monitoring enabled - use M-x chime--debug-show-async-stats")) + (message "Chime: Async monitoring enabled - use M-x chime-debug-show-async-stats")) ;;;###autoload (defun chime-debug-disable-async-monitoring () @@ -438,7 +440,7 @@ Shows loaded features before the check and logs async process details." (chime--log-silently " - Event not within %d-minute interval" interval))))) ;;;###autoload -(defun chime--debug-notification-filtering (event-time interval) +(defun chime-debug-notification-filtering (event-time interval) "Debug why a notification might not be generated for EVENT-TIME and INTERVAL. EVENT-TIME should be an Emacs time value (from encode-time or current-time). INTERVAL is the number of minutes before the event to notify. @@ -447,12 +449,12 @@ Traces through the notification filtering pipeline step by step, logging results to *Messages*. Example usage: - (chime--debug-notification-filtering + (chime-debug-notification-filtering (time-add (current-time) (seconds-to-time (* 4 24 3600))) ; 4 days from now 5760) ; 4 days in minutes Or for a specific date/time: - (chime--debug-notification-filtering + (chime-debug-notification-filtering (encode-time 0 0 10 22 11 2025) ; Nov 22, 2025 at 10:00 10) ; 10 minutes before" (interactive -- cgit v1.2.3