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)))