~jakob/exwm-buffer-groups

853de6d364dcfdae21ed7d383b7f1431b70117e6 — Jakob L. Kreuze 3 years ago 6719b2b master
Implement #'exwm-buffer-groups-kill-buffer
1 files changed, 18 insertions(+), 0 deletions(-)

M exwm-buffer-groups.el
M exwm-buffer-groups.el => exwm-buffer-groups.el +18 -0
@@ 90,6 90,24 @@ workspace."
                       nil nil nil nil current-buffer))))
  (switch-to-buffer buffer-or-name))

(defun exwm-buffer-groups-kill-buffer (buffer-or-name)
  "Kill the buffer specified by BUFFER-OR-NAME.
If called interactively, read the buffer name using
`completing-read', completing only on buffers in the current
workspace."
  (interactive
   (list
    (let ((buffers-in-workspace (map 'list
                                     #'buffer-name
                                     (elt exwm-buffer-groups-buffers
                                          exwm-workspace-current-index)))
          (current-buffer (buffer-name (other-buffer (current-buffer)))))
      ;; Clean up so that "nil" isn't showing up in the list.
      (exwm-buffer-groups--remove-buffers)
      (completing-read "Switch to buffer: " buffers-in-workspace
                       nil nil nil nil current-buffer))))
  (kill-buffer buffer-or-name))

(defun exwm-buffer-groups-move (nth)
  "Moves the current buffer to the NTH workspace."
  (interactive