summaryrefslogtreecommitdiff
path: root/modules/config-utilities.el
Commit message (Collapse)AuthorAgeFilesLines
* fix(config-utilities): guard emacsql-close against nil sqlite handleCraig Jennings2026-05-161-0/+20
| | | | | | | | | | | | | EmacSQL 4.3.1 registers a finalizer per connection that calls emacsql-close after GC. The sqlite-builtin and sqlite-module backends clear their handle slot during an explicit close, so the finalizer later runs emacsql-close on a closed connection and sqlite-close fires: finalizer failed: (wrong-type-argument sqlitep nil) Adds an :around method on emacsql-close for both backends that short-circuits when the handle is already nil. Requires cl-generic and eieio at the top of the file so the cl-defmethod forms expand.
* fix(config-utilities): repair validate-org-agenda-timestamps property checkCraig Jennings2026-04-301-31/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Two bugs in cj/validate-org-agenda-timestamps surfaced while extracting testable helpers. 1. The DEADLINE / SCHEDULED / TIMESTAMP property lookup used (intern (downcase prop)) as the key, producing 'deadline, 'scheduled, 'timestamp. org-element-property expects keywords (:deadline, :scheduled, :timestamp) and returns nil for plain symbols. The property-check branch had never reported anything since the function was written. Only inline-regex matches inside headline contents have ever been flagged. Fixed by building the keyword form: (intern (concat ":" (downcase prop))). 2. Once #1 is fixed, every property timestamp would also match the inline-timestamp regex during the contents scan (since the DEADLINE: / SCHEDULED: / TIMESTAMP lines fall inside contents-begin/end on a parsed headline), producing duplicate reports. Added a per-headline list of property timestamp strings and a member check before pushing an inline match. The function is also restructured into three pieces to make it testable: - cj/--validate-timestamps-in-buffer FILE — pure-ish: walks the current buffer, returns a list of (FILE POS HEAD PROP TS) tuples. - cj/--format-validation-report-section FILE INVALID — pure: returns the per-file org-formatted string. - cj/validate-org-agenda-timestamps (interactive) — orchestrates both helpers across org-agenda-files into a report buffer. The interactive entry-point's behaviour is unchanged from the user's side except that DEADLINE / SCHEDULED / TIMESTAMP property timestamps are now actually checked.
* refactor(config-utilities): extract cj/--recompile-emacs-homeCraig Jennings2026-04-301-24/+29
| | | | | | | | | | | | Splits the delete-then-recompile work out of cj/recompile-emacs-home so it takes DIR and an explicit NATIVE-P flag instead of probing boundp inside the work loop. Returns 'native or 'byte to surface which path actually ran. The interactive wrapper still asks `yes-or-no-p' against user-emacs-directory and probes `(boundp 'native-compile-async)' once to decide the dispatch and the prompt's wording. The cancellation message is unchanged.
* refactor(config-utilities): extract cj/--benchmark-methodCraig Jennings2026-04-301-8/+16
| | | | | | | | | | | | Splits the timer dispatch out of cj/benchmark-this-method so it can be tested with a known method symbol instead of going through read-string + completing-read. The interactive wrapper still prompts for both inputs, and now catches the user-error from the internal so the user-facing behaviour on invalid input is unchanged (the message goes to the echo area). Returns the funcall's value to the caller, which is observable through the timer.
* refactor(config-utilities): extract cj/--delete-compiled-files-in-dirCraig Jennings2026-04-301-8/+17
| | | | | | | | | | | | Splits the file-walking work out of cj/delete-emacs-home-compiled-files so it takes a directory parameter and returns a count. The interactive wrapper still hardcodes user-emacs-directory and prints the same status messages, just with the count interpolated. The split is scope-aligned with adding tests for the file-walking behaviour. The original function couldn't be tested without spawning files inside user-emacs-directory itself, which would pollute the running config.
* feat: Add comprehensive authentication cache reset utilityCraig Jennings2025-11-061-11/+1
| | | | | | | | | | | | | | | | | Added cj/reset-auth-cache function to recover from incorrect password entry for encrypted files like authinfo.gpg. Resolves "Bad session key" and "Decryption failed" errors. Key features: - Smart cache clearing: preserves 400-day GPG/SSH cache by default - Optional prefix arg (C-u) to also clear gpg-agent cache - Clears auth-source, EPA file handler, and optionally gpg-agent caches - Bound to C-; A for easy access (removed from debug menu C-c d) Also added cj/kill-gpg-agent for aggressive agent reset when needed. Consolidates and replaces simpler auth-source-only version that was previously in config-utilities.el.
* feat:which-key: Add descriptive labels for custom keymapsCraig Jennings2025-10-271-7/+18
| | | | | | | | | | | | Enhance which-key integration by providing detailed descriptions for new key bindings across multiple modules. This improves the usability of custom keymaps by clarifying the purpose of each keybinding, making it easier for users to navigate and understand different menus and options available within the configuration. This update ensures that all custom keymaps now display a descriptive label in the which-key popup to explain their functionality, aiding users in identifying keymap purposes promptly.
* fix: config-utilities: remove duplicate keymap bindingCraig Jennings2025-10-261-1/+0
| | | | | Removed a duplicate keymap binding for 'cj/delete-emacs-home-compiled-files'
* feat: undead-buffers: Add `cj/make-buffer-undead` function and testsCraig Jennings2025-10-221-3/+1
| | | | | | | | | | | | | | | Introduce a new function `cj/make-buffer-undead` that appends a buffer name to the `cj/undead-buffer-list`, preventing it from being killed. This comes along with a suite of tests to check various scenarios and edge cases for handling undead buffers. Additionally, add tests for related functions: `cj/kill-buffer-or-bury-alive`, `cj/kill-buffer-and-window`, and others to ensure they correctly manage buffers, particularly with undead-status considerations. Refactor `undead-buffer-list` naming for consistency and clarity in the module.
* fix: config-utilities: Show Emacs binary location in version infoCraig Jennings2025-10-211-1/+3
| | | | Also update which-key label for config debugging utilities.
* refactor:config-utils: method rename, remove dead codeCraig Jennings2025-10-211-318/+134
| | | | | | - renamed methods to allow intuitive grouping - removed uncommented/unused code - fixed compilation bug when no compilation is available
* feat:config-utils: add debug-keymap C-c d, profiling, benchmarkingCraig Jennings2025-10-211-98/+230
|
* docs/refactor:utilities: Add documentation; improve organizationCraig Jennings2025-10-191-23/+143
| | | | | | | | | - Add detailed module commentary with feature list and key commands - Document all functions with proper docstrings - Add function/variable declarations for lazy-loaded packages - Add new Emacs build summary functionality, moved from system-utils - Fix variable initialization order in list-loaded-packages - Improve code organization and suppress byte-compiler warnings
* fix: config-utilities: docstring quoting issueCraig Jennings2025-10-181-1/+1
|
* changing repositoriesCraig Jennings2025-10-121-0/+291