diff options
| author | Craig Jennings <c@cjennings.net> | 2025-11-15 14:08:47 -0600 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2025-11-15 14:08:47 -0600 |
| commit | 0be39bc9fa41f14f9d6d1a449f8f2b77a502c619 (patch) | |
| tree | 068b55cf2a65909e2b513f3f3f31bbd8177afd72 /modules/system-lib.el | |
| parent | 8c4ad1ad6f5bf3ec0c0f2c9b381d614f4a0c7f8e (diff) | |
fix(tests): Move cj/log-silently to system-lib.el, fix all test failures
Consolidated cj/log-silently function to system-lib.el as the canonical
location for low-level utility functions. This fixes 4 failing tests in
video-audio-recording that couldn't find the function.
Changes:
- Move cj/log-silently to system-lib.el (from system-utils.el)
- Remove duplicate definition from org-agenda-config-debug.el
- Remove duplicate definition from system-utils.el
- Add (require 'system-lib) to all modules using cj/log-silently:
- video-audio-recording.el
- org-agenda-config-debug.el
- media-utils.el (also removed declare-function)
- elfeed-config.el (replaced system-utils with system-lib)
- wrap-up.el
Test Results:
- Before: 112/113 passing (4 video-audio-recording tests failing)
- After: 113/113 passing ✓
All tests now pass with zero failures.
Fixes TODO #809-895 (move cj/log-silently to system-lib.el)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat (limited to 'modules/system-lib.el')
| -rw-r--r-- | modules/system-lib.el | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/modules/system-lib.el b/modules/system-lib.el index 8bbf8474..4c2f17ef 100644 --- a/modules/system-lib.el +++ b/modules/system-lib.el @@ -6,6 +6,7 @@ ;; ;; Functions include: ;; - Checking if external programs are available in PATH +;; - Silent logging to *Messages* buffer ;; ;;; Code: @@ -16,5 +17,15 @@ PROGRAM should be a string naming an executable program." (not (string-empty-p program)) (executable-find program))) +(defun cj/log-silently (format-string &rest args) + "Append formatted message (FORMAT-STRING with ARGS) to *Messages* buffer. +This does so without echoing in the minibuffer." + (let ((inhibit-read-only t)) + (with-current-buffer (get-buffer-create "*Messages*") + (goto-char (point-max)) + (unless (bolp) (insert "\n")) + (insert (apply #'format format-string args)) + (unless (bolp) (insert "\n"))))) + (provide 'system-lib) ;;; system-lib.el ends here |
