diff options
| -rw-r--r-- | README.org | 4 | ||||
| -rw-r--r-- | tests/README-DEBUG-TESTS.md | 6 | ||||
| -rw-r--r-- | tests/test-wttrin-integration-with-debug.el | 4 | ||||
| -rw-r--r-- | wttrin-debug.el | 5 |
4 files changed, 10 insertions, 9 deletions
@@ -280,7 +280,7 @@ If wttrin isn't working as expected, enable debug mode to see detailed logging o Once debug mode is enabled, you can view the debug log: #+begin_src emacs-lisp - M-x wttrin--debug-show-log + M-x wttrin-debug-show-log #+end_src This shows a timestamped log of all wttrin operations: @@ -304,7 +304,7 @@ When working correctly, the debug log looks like: *** Common Issues - *xterm-color missing*: Ensure xterm-color is installed (`M-x package-install RET xterm-color`) - *Debug not working*: Remember to set `wttrin-debug t` *before* loading wttrin -- *Mode-line not showing*: Check `M-x wttrin--debug-show-log` to see if fetch succeeded +- *Mode-line not showing*: Check `M-x wttrin-debug-show-log` to see if fetch succeeded - *No network access*: Debug log will show "Network error" messages ** History diff --git a/tests/README-DEBUG-TESTS.md b/tests/README-DEBUG-TESTS.md index 7310123..c1abd52 100644 --- a/tests/README-DEBUG-TESTS.md +++ b/tests/README-DEBUG-TESTS.md @@ -55,7 +55,7 @@ M-x debug-wttrin-enable ### View Debug Log ```emacs-lisp -M-x wttrin--debug-show-log +M-x wttrin-debug-show-log ``` This opens a buffer showing all debug events with timestamps. @@ -63,7 +63,7 @@ This opens a buffer showing all debug events with timestamps. ### Clear Debug Log ```emacs-lisp -M-x wttrin--debug-clear-log +M-x wttrin-debug-clear-log ``` ## Test Fixtures @@ -76,7 +76,7 @@ If wttrin isn't loading in your configuration: 1. **Enable debug mode** (set `wttrin-debug` to `t` before loading) 2. **Check dependencies**: Run `M-x package-list-packages` and ensure `xterm-color` is installed -3. **View debug log**: Run `M-x wttrin--debug-show-log` after trying to use wttrin +3. **View debug log**: Run `M-x wttrin-debug-show-log` after trying to use wttrin 4. **Check for errors**: Look in `*Messages*` buffer for any error messages The debug log will show you exactly where the process stops or fails. diff --git a/tests/test-wttrin-integration-with-debug.el b/tests/test-wttrin-integration-with-debug.el index db4e05f..9f50df2 100644 --- a/tests/test-wttrin-integration-with-debug.el +++ b/tests/test-wttrin-integration-with-debug.el @@ -37,7 +37,7 @@ (setq wttrin-debug t) ;; Clear any existing debug log (when (featurep 'wttrin-debug) - (wttrin--debug-clear-log)) + (wttrin-debug-clear-log)) ;; Clear cache (wttrin-clear-cache) ;; Set test configuration @@ -51,7 +51,7 @@ (wttrin-mode-line-mode -1)) (wttrin-clear-cache) (when (featurep 'wttrin-debug) - (wttrin--debug-clear-log)) + (wttrin-debug-clear-log)) (setq wttrin-mode-line-string nil) (setq wttrin--mode-line-tooltip-data nil)) diff --git a/wttrin-debug.el b/wttrin-debug.el index 0ddecab..810f875 100644 --- a/wttrin-debug.el +++ b/wttrin-debug.el @@ -115,14 +115,15 @@ FORMAT-STRING and ARGS are passed to `format'." (push (cons timestamp msg) wttrin--debug-log) (message "[wttrin-debug %s] %s" timestamp msg)))) -(defun wttrin--debug-clear-log () +;;;###autoload +(defun wttrin-debug-clear-log () "Clear the debug log." (interactive) (setq wttrin--debug-log nil) (message "Wttrin debug log cleared")) ;;;###autoload -(defun wttrin--debug-show-log () +(defun wttrin-debug-show-log () "Display the wttrin debug log in a buffer." (interactive) (with-current-buffer (get-buffer-create "*wttrin-debug-log*") |
