Closed Ultramann closed 4 years ago
First, I love perspective, so thanks for all the work on this package; now on to the issue.
If you invoke C-k in the persp-ivy-switch-buffer minibuffer the selected buffer is correctly killed, but the minibuffer buffer list is updated to include all buffers, not just perspective local ones. I did a little homework and the cause seems apparent. 1.persp-ivy-switch-buffer calls to persp--switch-buffer-ivy-counsel-helper https://github.com/nex3/perspective-el/blob/17cfb7f3a50c5ebc8edafd6418531c17c2cbf47e/perspective.el#L1270-L1274
C-k
persp-ivy-switch-buffer
persp--switch-buffer-ivy-counsel-helper
ivy-switch-buffer-map
ivy-switch-buffer-kill
It feels like C-k should maintain the perspective local buffer list; but my elisp foo isn't great I'm not sure what the best way to fix this myself.
[0] https://github.com/abo-abo/swiper/blob/e58bfc162a2df5b67a820d0311c313d3db522073/ivy.el#L4419
Good catch! I just pushed a workaround for this problem: e4cbee6a13. It should now be in MELPA. Could you please try it and let me know how it works for you?
Seems to work perfectly! Many thanks!
First, I love perspective, so thanks for all the work on this package; now on to the issue.
If you invoke
C-k
in thepersp-ivy-switch-buffer
minibuffer the selected buffer is correctly killed, but the minibuffer buffer list is updated to include all buffers, not just perspective local ones. I did a little homework and the cause seems apparent. 1.persp-ivy-switch-buffer
calls topersp--switch-buffer-ivy-counsel-helper
https://github.com/nex3/perspective-el/blob/17cfb7f3a50c5ebc8edafd6418531c17c2cbf47e/perspective.el#L1270-L1274persp--switch-buffer-ivy-counsel-helper
has the meat of the logic, does the filters of buffers to display in the minibuffer by current perspective, it also sets the keymap in the minibuffer to theivy-switch-buffer-map
, which mapsC-k
toivy-switch-buffer-kill
[0] which isn't perspective aware. https://github.com/nex3/perspective-el/blob/17cfb7f3a50c5ebc8edafd6418531c17c2cbf47e/perspective.el#L1248-L1262It feels like
C-k
should maintain the perspective local buffer list; but my elisp foo isn't great I'm not sure what the best way to fix this myself.[0] https://github.com/abo-abo/swiper/blob/e58bfc162a2df5b67a820d0311c313d3db522073/ivy.el#L4419