Skip to content

Instantly share code, notes, and snippets.

@puffnfresh
Created September 27, 2011 06:29
Show Gist options
  • Save puffnfresh/1244465 to your computer and use it in GitHub Desktop.
Save puffnfresh/1244465 to your computer and use it in GitHub Desktop.
Emacs hook to only show current perspective's buffers in iswitchb
;; For perspective.el:
;; https://github.com/nex3/perspective-el
(defun iswitchb-persp-curr-only ()
(let* ((names (remq nil (mapcar 'buffer-name (persp-buffers persp-curr))))
(matches (remove-if-not (lambda (x) (member x names)) iswitchb-temp-buflist)))
(setf iswitchb-temp-buflist matches)))
(add-hook 'iswitchb-make-buflist-hook 'iswitchb-persp-curr-only)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment