From 84e1554f14e41000793c473196d194ad85cbcaee Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 28 May 2021 11:43:40 -0400 Subject: [PATCH] Fix #5109: startup files not added to main persp --- modules/ui/workspaces/config.el | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/modules/ui/workspaces/config.el b/modules/ui/workspaces/config.el index 5d5198d4e..3ecf9d6b1 100644 --- a/modules/ui/workspaces/config.el +++ b/modules/ui/workspaces/config.el @@ -134,12 +134,8 @@ stored in `persp-save-dir'.") winner-ring-alist alist winner-pending-undo-ring pending-undo-ring))))) - ;; We don't rely on the built-in mechanism for auto-registering a buffer to - ;; the current workspace; some buffers slip through the cracks. Instead, we - ;; add buffers when they are switched to. - (setq persp-add-buffer-on-find-file nil - persp-add-buffer-on-after-change-major-mode nil) - (add-hook! '(doom-switch-buffer-hook server-visit-hook) + ;;;; Registering buffers to perspectives + (add-hook! 'doom-switch-buffer-hook (defun +workspaces-add-current-buffer-h () "Add current buffer to focused perspective." (or (not persp-mode)