From f9d9e003a208c22cd4d390125d990b79a4c0a0e7 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sat, 27 Jun 2026 12:55:58 -0400 Subject: feat(completion): tag four pickers with categories for marginalia Add cj/completion-table (and an annotated variant) to system-lib: a wrapper that tags any collection with a completion category so marginalia, embark, consult, and sorting can recognize the candidates. None of the config's completing-reads declared a category, so the rich-candidate pickers showed bare. This applies it to the four whose candidates match a standard category and so need no custom annotator: benchmark-method (function), ERC buffer switch (buffer), ai-term close (buffer), and theme switch (theme). Each now annotates for free. --- modules/erc-config.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'modules/erc-config.el') diff --git a/modules/erc-config.el b/modules/erc-config.el index 3e98a66a3..4eac812c4 100644 --- a/modules/erc-config.el +++ b/modules/erc-config.el @@ -140,6 +140,8 @@ Change this value to use a different nickname.") server-buffers)) +(require 'system-lib) + (defun cj/erc-switch-to-buffer-with-completion () "Switch to an ERC buffer using completion. If no ERC buffers exist, prompt to connect to a server. @@ -148,7 +150,7 @@ Buffer names are shown with server context for clarity." (let* ((erc-buffers (erc-buffer-list)) (buffer-names (mapcar #'buffer-name erc-buffers))) (if buffer-names - (let ((selected (completing-read "Switch to ERC buffer: " buffer-names nil t))) + (let ((selected (completing-read "Switch to ERC buffer: " (cj/completion-table 'buffer buffer-names) nil t))) (switch-to-buffer selected)) (message "No ERC buffers found.") (when (y-or-n-p "Connect to an IRC server? ") -- cgit v1.2.3