feat(mu4e): only call mu4e if necessary

If we are already reading emails in Mu4e or composing a message, there
is no reason to go back to the main window.
This commit is contained in:
Antonio Ruiz 2022-08-31 11:28:10 -04:00 committed by Henrik Lissner
parent f6bddc8fe2
commit 32baf538ee

View file

@ -67,7 +67,14 @@ default/fallback account."
(setq +mu4e--old-wconf (current-window-configuration)) (setq +mu4e--old-wconf (current-window-configuration))
(delete-other-windows) (delete-other-windows)
(switch-to-buffer (doom-fallback-buffer))) (switch-to-buffer (doom-fallback-buffer)))
(mu4e) (unless (memq (buffer-local-value 'major-mode
(window-buffer (selected-window)))
'(mu4e-main-mode
mu4e-headers-mode
mu4e-view-mode
mu4e-compose-mode
org-msg-edit-mode))
(mu4e))
;; (save-selected-window ;; (save-selected-window
;; (prolusion-mail-show)) ;; (prolusion-mail-show))
) )