add auto-start of KmN org persp-mode config when opening an org file in the org profile

This commit is contained in:
KemoNine 2022-04-24 16:37:32 -04:00
parent f56c4809cd
commit e7dfca78c4
1 changed files with 11 additions and 0 deletions

View File

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