Replies: 1 comment
-
I found this piece of code that works pretty well for my purpose in a persp-mode issue. I guess that instead of looking for a way to filter or validate buffers within the (with-eval-after-load "persp-mode-autoloads"
(with-eval-after-load "consult")
(defun my/consult-switch-to-buffer ()
"`consult-buffer' with buffers provided by persp."
(interactive)
(with-persp-buffer-list () (consult-buffer))
(global-set-key (kbd "C-x b") #'my/consult-switch-to-buffer))) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I hope this question has not been asked already, but I did not find it.
I am not great at Elisp, but I am starting to understand it better, so I thought I would ask. I get how I can add sources to the
consult-buffer-sources
thanks to the documentation, but I do not think this is what I am looking for.I am trying to restrict the list of buffers presented by
consult-buffer
to the current perspective from thepersp-mode
package. Which means that I would like to apply a filter to all definedconsult-buffer-sources
. Doom Emacs has a built-in function for that, but I lose all the greatconsult-buffer
narrow actions, as well as some pretty useful configured sources like org-roam buffers.I can produce the list of buffers I am interested in using
(persp-buffers (get-current-persp))
, but I do not see how I can use it. Is there a way to pass some kind of filter/validation function to the list of buffers beforeconsult-buffers
displays it ?Thanks for your time, and a great package.
Beta Was this translation helpful? Give feedback.
All reactions