about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--init.el2
-rw-r--r--lisp/acdw-consult.el23
2 files changed, 25 insertions, 0 deletions
diff --git a/init.el b/init.el index 84e0945..6620f45 100644 --- a/init.el +++ b/init.el
@@ -1211,6 +1211,8 @@ specific to most general, they are these:
1211 "M-s e" #'consult-isearch 1211 "M-s e" #'consult-isearch
1212 "M-s l" #'consult-line)) 1212 "M-s l" #'consult-line))
1213 1213
1214 (:option (append consult-buffer-sources) #'circe-buffer-source)
1215
1214 (consult-history-to-modes ((minibuffer-local-map . nil) 1216 (consult-history-to-modes ((minibuffer-local-map . nil)
1215 (shell-mode-map . shell-mode-hook) 1217 (shell-mode-map . shell-mode-hook)
1216 (term-mode-map . term-mode-hook) 1218 (term-mode-map . term-mode-hook)
diff --git a/lisp/acdw-consult.el b/lisp/acdw-consult.el index daad645..84a7fea 100644 --- a/lisp/acdw-consult.el +++ b/lisp/acdw-consult.el
@@ -67,4 +67,27 @@ if ripgrep is installed, otherwise `consult-grep'."
67 defuns))) 67 defuns)))
68 `(progn ,@ (nreverse defuns)))) 68 `(progn ,@ (nreverse defuns))))
69 69
70;;; Circe buffers source
71
72(require 'cl-lib)
73(autoload 'circe-server-buffers "circe")
74(autoload 'circe-server-chat-buffers "circe")
75
76(defun circe-all-buffers ()
77 (cl-loop with servers = (circe-server-buffers)
78 for server in servers
79 collect server
80 nconc
81 (with-current-buffer server
82 (cl-loop for buf in (circe-server-chat-buffers)
83 collect buf))))
84
85(defvar circe-buffer-source
86 `(:name "circe"
87 :hidden t
88 :narrow ?c
89 :category buffer
90 :state ,#'consult--buffer-state
91 :items ,(lambda () (mapcar #'buffer-name (circe-all-buffers)))))
92
70(provide 'acdw-consult) 93(provide 'acdw-consult)