mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-11-25 09:36:14 +01:00
Make a new cosult
source for popped buffers
Signed-off-by: main <magic_rb@redalder.org>
This commit is contained in:
parent
475ffc9f2c
commit
74bb8268a7
|
@ -18,8 +18,10 @@ Enable ~popper~, a better version of ~popwin~, which might actually work. It gro
|
|||
(setq popper-reference-buffers
|
||||
'("\\*Messages\\*"
|
||||
"\\*Warnings\\*"
|
||||
"\\*Error\\*"
|
||||
"Output\\*$"
|
||||
"\\*HS-Error\\*"
|
||||
"^\\*Ement compose.*\\*$"
|
||||
help-mode
|
||||
compilation-mode
|
||||
rustic-compilation-mode
|
||||
|
@ -27,27 +29,33 @@ Enable ~popper~, a better version of ~popwin~, which might actually work. It gro
|
|||
(popper-mode +1))
|
||||
#+END_SRC
|
||||
|
||||
Add a [[id:db1d0122-58d6-4dec-84f6-afcb52937fc7][consult]] source for popped buffers.
|
||||
Very temporary fix below, fix immediately.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(with-eval-after-load consult
|
||||
(setq magic_rb/consult-source-popper
|
||||
`(:name "popper"
|
||||
:narrow ?P
|
||||
:category buffer
|
||||
:face consult-buffer
|
||||
:history buffer-name-history
|
||||
:state consult--buffer-state
|
||||
:items
|
||||
(lambda ()
|
||||
(let ((group-name (when popper-group-function
|
||||
(with-current-buffer buf (funcall popper-group-function)))))
|
||||
(mapcar #'buffer-name
|
||||
(append
|
||||
(mapcar #'cdr (alist-get group-name popper-buried-popup-alist))
|
||||
(mapcar #'cdr (alist-get group-name popper-open-popup-alist))))))))
|
||||
(setq org-src-window-setup 'other-window)
|
||||
#+end_src
|
||||
|
||||
(add-to-list 'consult-buffer-sources 'magic_rb/consult-source-popper 'append))
|
||||
Add a [[id:db1d0122-58d6-4dec-84f6-afcb52937fc7][consult]] source for popped buffers.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(with-eval-after-load 'consult
|
||||
(setq magic_rb/consult-source-popper
|
||||
`(:name "popper"
|
||||
:narrow ?P
|
||||
:category buffer
|
||||
:face consult-buffer
|
||||
:history buffer-name-history
|
||||
:state consult--buffer-state
|
||||
:items
|
||||
(lambda ()
|
||||
(let ((group-name (when popper-group-function
|
||||
(with-current-buffer buf (funcall popper-group-function)))))
|
||||
(mapcar #'buffer-name
|
||||
(append
|
||||
(mapcar #'cdr (alist-get group-name popper-buried-popup-alist))
|
||||
(mapcar #'cdr (alist-get group-name popper-open-popup-alist))))))))
|
||||
|
||||
(add-to-list 'consult-buffer-sources 'magic_rb/consult-source-popper 'append))
|
||||
#+end_src
|
||||
|
||||
Force user buffer switching to also obey ~display-buffer-alist~.
|
||||
|
|
Loading…
Reference in a new issue