diff --git a/.emacs.d/init.el b/.emacs.d/init.el index db315b54..ebbdc787 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -165,9 +165,12 @@ (global-set-key (kbd "C-x g") 'magit-status)) ;;; Mail -(when (fboundp 'mu4e) +;; mu4e is usually site-local and not part of ELPA. +(when (delq nil (mapcar (lambda (path) (string-match "/mu4e/\\|/mu4e$" path)) load-path)) (nconc package-selected-packages '(helm-mu mu4e-maildirs-extension mu4e-alert))) (with-eval-after-load 'mu4e (require 'init-mu4e)) +;; TODO: It seems that calling `mu4e-headers-unread' directly does not initialize mu4e properly: +;; it won't fetch e-mails and won't complete addresses. (autoload 'mu4e-headers-unread "mu4e") ;;; Makefile diff --git a/.emacs.d/lisp/init-exwm.el b/.emacs.d/lisp/init-exwm.el index b8cf2e65..90934870 100644 --- a/.emacs.d/lisp/init-exwm.el +++ b/.emacs.d/lisp/init-exwm.el @@ -80,7 +80,7 @@ (when (fboundp 'emms) (exwm-input-set-key (kbd "s-a") #'emms-smart-browse) (exwm-input-set-key (kbd "s-A") #'emms)) -(when (fboundp 'mu4e) +(when (delq nil (mapcar (lambda (path) (string-match "/mu4e/\\|/mu4e$" path)) load-path)) (exwm-input-set-key (kbd "s-m") #'mu4e-headers-unread)) ;;; External application shortcuts.