From 30a806dcfc5d229fe4bd7305d625505e44c2886e Mon Sep 17 00:00:00 2001 From: Kevin Cotugno Date: Sun, 24 Jun 2018 21:13:47 -0700 Subject: [PATCH] Don't raise error when mu4e doesn't exist --- .emacs.d/init.el | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 991eca4..14f655c 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -213,22 +213,25 @@ useful for alternating between light and dark themes" (when (file-exists-p cargo-bin) (add-to-list 'exec-path cargo-bin))) -(require 'mu4e) -(setq mu4e-maildir (concat (getenv "HOME") "/.mail")) -(setq mu4e-drafts-folder "/Drafts") -(setq mu4e-sent-folder "/Sent") -(setq mu4e-trash-folder "/Trash") -(setq mu4e-get-mail-command "offlineimap") -(setq mu4e-view-show-addresses t) +(global-unset-key (kbd "C-x m")) ; We don't want the default compose-mail +(when (require 'mu4e nil t) + (setq mu4e-maildir (concat (getenv "HOME") "/.mail")) + (setq mu4e-drafts-folder "/Drafts") + (setq mu4e-sent-folder "/Sent") + (setq mu4e-trash-folder "/Trash") + (setq mu4e-get-mail-command "offlineimap") + (setq mu4e-view-show-addresses t) + (global-set-key (kbd "C-x m") 'mu4e) + + (setq mu4e-compose-reply-to-address "kevin@kevincotugno.com" + user-mail-address "kevin@kevincotugno.com" + user-full-name "Kevin Cotugno") + (setq + message-send-mail-function 'smtpmail-send-it + smtpmail-smtp-server "smtp.cotugno.family" + smtpmail-stream-type 'starttls + smtpmail-smtp-service 587) + (setq message-kill-buffer-on-exit t)) -(setq mu4e-compose-reply-to-address "kevin@kevincotugno.com" - user-mail-address "kevin@kevincotugno.com" - user-full-name "Kevin Cotugno") -(setq - message-send-mail-function 'smtpmail-send-it - smtpmail-smtp-server "smtp.cotugno.family" - smtpmail-stream-type 'starttls - smtpmail-smtp-service 587) -(setq message-kill-buffer-on-exit t) ;; End Plugins