2017-06-08 11:47:56 +02:00
|
|
|
;;; app/email/autoload/email.el -*- lexical-binding: t; -*-
|
2017-04-19 13:18:03 -04:00
|
|
|
|
2018-02-18 03:09:39 -05:00
|
|
|
(defvar +email-workspace-name "*mu4e*"
|
|
|
|
"TODO")
|
|
|
|
|
|
|
|
(add-hook 'mu4e-main-mode-hook #'+email|init)
|
|
|
|
|
2017-04-19 13:18:03 -04:00
|
|
|
;;;###autoload
|
|
|
|
(defun =email ()
|
|
|
|
"Start email client."
|
|
|
|
(interactive)
|
2018-02-18 03:09:39 -05:00
|
|
|
(+workspace-switch +email-workspace-name t)
|
|
|
|
(mu4e~start 'mu4e~main-view)
|
|
|
|
;; (save-selected-window
|
|
|
|
;; (prolusion-mail-show))
|
|
|
|
)
|
2017-04-19 13:18:03 -04:00
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
(defun +email/compose ()
|
|
|
|
"Compose a new email."
|
|
|
|
(interactive)
|
|
|
|
;; TODO Interactively select email account
|
2017-06-08 11:47:56 +02:00
|
|
|
(call-interactively #'mu4e-compose-new))
|
2017-04-19 13:18:03 -04:00
|
|
|
|
2018-02-18 03:09:39 -05:00
|
|
|
|
|
|
|
;;
|
|
|
|
;; Hooks
|
|
|
|
;;
|
|
|
|
|
|
|
|
(defun +email|init ()
|
|
|
|
(add-hook 'kill-buffer-hook #'+email|kill-mu4e nil t))
|
|
|
|
|
|
|
|
(defun +email|kill-mu4e ()
|
|
|
|
;; (prolusion-mail-hide)
|
|
|
|
(when (+workspace-exists-p +email-workspace-name)
|
|
|
|
(+workspace/delete +email-workspace-name)))
|
|
|
|
|