From a5877139cde23fa928402e4173f31797bf9c53b7 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 21 Apr 2018 21:04:34 -0400 Subject: [PATCH] feature/workspaces: persp-mode integration for eshell, compile & magit-status --- modules/feature/workspaces/config.el | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/modules/feature/workspaces/config.el b/modules/feature/workspaces/config.el index 72731e51a..3feb9c6d5 100644 --- a/modules/feature/workspaces/config.el +++ b/modules/feature/workspaces/config.el @@ -133,5 +133,21 @@ Uses `+workspaces-main' to determine the name of the main workspace." ;; per-project workspaces, but reuse current workspace if empty (setq projectile-switch-project-action #'+workspaces|set-project-action counsel-projectile-switch-project-action #'+workspaces|switch-to-project) - (add-hook 'projectile-after-switch-project-hook #'+workspaces|switch-to-project)) + (add-hook 'projectile-after-switch-project-hook #'+workspaces|switch-to-project) + + ;; + ;; eshell + (persp-def-buffer-save/load + :mode 'eshell-mode :tag-symbol 'def-eshell-buffer + :save-vars '(major-mode default-directory)) + ;; compile + (persp-def-buffer-save/load + :mode 'compilation-mode :tag-symbol 'def-compilation-buffer + :save-vars + '(major-mode default-directory compilation-directory compilation-environment compilation-arguments)) + ;; magit-status + (persp-def-buffer-save/load + :mode 'magit-status-mode :tag-symbol 'def-magit-status-buffer + :save-vars '(major-mode default-directory) + :after-load-function #'(lambda (b &rest _) (with-current-buffer b (magit-refresh)))))