+narf/get-visible-windows; filter from exhaustive buffer list in narf/get-visible-buffers

This commit is contained in:
Henrik Lissner 2015-12-12 01:28:04 -05:00
parent c997bcc936
commit 8060e6c8d1

View file

@ -49,10 +49,14 @@ Inspired from http://demonastery.org/2013/04/emacs-evil-narrow-region/"
`wg-mess-with-buffer-list'." `wg-mess-with-buffer-list'."
(wg-workgroup-associated-buffers (wg-current-workgroup))) (wg-workgroup-associated-buffers (wg-current-workgroup)))
;;;###autoload
(defun narf/get-visible-windows ()
(-map #'get-buffer-window (narf/get-visible-buffers (narf/get-all-buffers))))
;;;###autoload ;;;###autoload
(defun narf/get-visible-buffers (&optional buffer-list) (defun narf/get-visible-buffers (&optional buffer-list)
"Get a list of buffers that are not buried (i.e. visible)" "Get a list of buffers that are not buried (i.e. visible)"
(-filter #'get-buffer-window (or buffer-list (narf/get-buffers)))) (-filter #'get-buffer-window (or buffer-list (narf/get-all-buffers))))
;;;###autoload ;;;###autoload
(defun narf/get-buried-buffers (&optional buffer-list) (defun narf/get-buried-buffers (&optional buffer-list)