From b458d5ac30afed348df4788721bb48be94e97c60 Mon Sep 17 00:00:00 2001 From: Chris Feng Date: Wed, 16 Sep 2015 21:32:38 +0800 Subject: Allow showing buffers on other workspaces and moving an X window by switching to its buffer * exwm-workspace.el (exwm-workspace-show-all-buffers, exwm-workspace-switch) (exwm-workspace-move-window, exwm-workspace-switch-to-buffer): Show buffers on other workspaces if `exwm-workspace-show-all-buffers' is non-nil. * exwm-layout.el (exwm-layout-show-all-buffers, exwm-layout--refresh): Allow moving an X window by switch to its corresponding buffer from another workspace when `exwm-layout-show-all-buffers' is non-nil. * exwm.el (exwm--ido-buffer-window-other-frame): Handle the case when `exwm-layout-show-all-buffers' is non-nil. * exwm-floating.el (exwm-floating--set-floating): Handle the case when *scratch* buffer is killed. * exwm-workspace.el (exwm-workspace-switch-to-buffer): Renamed from `exwm-workspace-switch-to-window' to better reflect its role. --- exwm-floating.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'exwm-floating.el') diff --git a/exwm-floating.el b/exwm-floating.el index 04493764bd0f..12390b0ea2e1 100644 --- a/exwm-floating.el +++ b/exwm-floating.el @@ -67,7 +67,10 @@ exwm-workspace--current))) (original-id (frame-parameter original-frame 'exwm-window-id)) ;; Create new frame - (frame (with-current-buffer "*scratch*" + (frame (with-current-buffer + (or (get-buffer "*scratch*") + (prog1 (get-buffer-create "*scratch*") + (set-buffer-major-mode "*scratch*"))) (prog2 (exwm--lock) (make-frame -- cgit 1.4.1