From e7dfca78c405e4245837f5ac73f6e16575605130 Mon Sep 17 00:00:00 2001 From: KemoNine Date: Sun, 24 Apr 2022 16:37:32 -0400 Subject: [PATCH] add auto-start of KmN org persp-mode config when opening an org file in the org profile --- org/init.el | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/org/init.el b/org/init.el index 4fcf265..11355e9 100644 --- a/org/init.el +++ b/org/init.el @@ -110,3 +110,14 @@ (load "~/.emacs.d.profiles/org/config-org-desktop.el")) (when kmn/is-termux (load "~/.emacs.d.profiles/org/config-org-mobile.el")) + +(with-eval-after-load "persp-mode-autoload" + (with-eval-after-load "org" + (persp-def-auto-persp "KmN" + :mode-name ".*org-mode.*" + :noauto + :dyn-env '(after-switch-to-buffer-functions ;; prevent recursion + (persp-add-buffer-on-find-file nil) + persp-add-buffer-on-after-change-major-mode) + :hooks '(after-switch-to-buffer-functions) + :switch 'window)))