Closed nandryshak closed 9 years ago
No, it works.)
But the next-buffer
uses the window-prev-buffer
function to get a list of buffers.
And I think it is a good idea to filter previous buffer lists for all windows when switching perspective... so I will implement this shortly.
For now you could add to your config something like this:
(add-hook 'persp-activated-hook
#'(lambda ()
(let ((pbs (safe-persp-buffers (get-frame-persp))))
(mapc #'(lambda (w)
(set-window-prev-buffers
w
(delete-if-not
#'(lambda (bl)
(memq (typecase bl
(cons (car bl))
(t bl))
pbs))
(window-prev-buffers w)))
(set-window-next-buffers
w
(delete-if-not
#'(lambda (bl)
(memq (typecase bl
(cons (car bl))
(t bl))
pbs))
(window-next-buffers w))))
(window-list)))))
Then restart emacs (or execute this code(using M-x ielm, or with eval-region or another method), then switch to another perspective and switch back), and now your binding must be working.
This is possibly fixed by a89c9c18140302052a69182210219e9147dd5202.
I'm trying to use this macro with
next
/previous-buffer
, like this:But it's switching to buffers that aren't part of the current perspective. Is this broken? Or am I doing something wrong?