2017-07-19 17:17:24 +02:00
|
|
|
;;; mu4e
|
|
|
|
|
2017-07-25 00:11:29 +02:00
|
|
|
;; TODO: Notifications don't work? Change `display-time-mail-icon' color in modeline.
|
2017-07-24 16:21:33 +02:00
|
|
|
;; TODO: Reply to all by default.
|
2017-07-19 17:17:24 +02:00
|
|
|
;; TODO: Is it possible to mbsync without attachments?
|
2017-07-28 09:12:25 +02:00
|
|
|
;; TODO: Use abbrevs in compose mode.
|
2017-07-29 14:00:00 +02:00
|
|
|
;; TODO: Do not cite when replying: https://github.com/djcb/mu/issues/1110.
|
|
|
|
;; TODO: With mu4e-alert, default-directory remains stuck to the initial folder,
|
|
|
|
;; which causes errors if it becomes inaccessible.
|
|
|
|
;; See: https://github.com/iqbalansari/mu4e-alert/issues/24.
|
2017-07-31 08:58:44 +02:00
|
|
|
;; TODO: Face of `message-cited-text' does not work.
|
2017-07-19 17:17:24 +02:00
|
|
|
|
2017-07-24 16:21:33 +02:00
|
|
|
(when (require 'mu4e-maildirs-extension nil t)
|
|
|
|
(mu4e-maildirs-extension))
|
|
|
|
(when (require 'mu4e-alert nil t)
|
|
|
|
(mu4e-alert-enable-mode-line-display))
|
2017-07-19 17:17:24 +02:00
|
|
|
|
2017-07-27 00:08:58 +02:00
|
|
|
(defun mu4e-headers-unread ()
|
|
|
|
(interactive)
|
|
|
|
(mu4e-headers-search "flag:unread AND NOT flag:trashed"))
|
|
|
|
|
2017-07-19 17:17:24 +02:00
|
|
|
(setq
|
2017-07-31 08:57:46 +02:00
|
|
|
;; Attachments
|
2017-07-19 17:17:24 +02:00
|
|
|
mu4e-attachment-dir "~/temp"
|
2017-07-31 08:57:46 +02:00
|
|
|
mu4e-save-multiple-attachments-without-asking t
|
2017-07-19 17:17:24 +02:00
|
|
|
|
2017-07-24 16:21:33 +02:00
|
|
|
;; IMAP sync.
|
|
|
|
mu4e-maildir "~/.cache/mail"
|
|
|
|
mu4e-get-mail-command "mbsync -a"
|
|
|
|
mu4e-update-interval 60
|
|
|
|
mu4e-change-filenames-when-moving t ; Needed for mbsync.
|
|
|
|
|
2017-07-19 17:17:24 +02:00
|
|
|
;; SMTP
|
|
|
|
message-send-mail-function 'smtpmail-send-it
|
|
|
|
|
2017-07-27 17:33:21 +02:00
|
|
|
;; Don't keep sent e-mail buffer.
|
|
|
|
message-kill-buffer-on-exit t
|
|
|
|
|
2017-07-19 17:17:24 +02:00
|
|
|
;; For reporting bugs, "C-x m", etc.
|
|
|
|
mail-user-agent 'mu4e-user-agent
|
|
|
|
mu4e-compose-dont-reply-to-self t
|
|
|
|
|
|
|
|
;; Display
|
|
|
|
mu4e-headers-date-format "%F %R"
|
|
|
|
mu4e-headers-fields '((:human-date . 16)
|
|
|
|
(:flags . 6)
|
2017-07-31 08:58:44 +02:00
|
|
|
(:size . 6)
|
2017-07-19 17:17:24 +02:00
|
|
|
(:mailing-list . 10)
|
|
|
|
(:from . 22)
|
|
|
|
(:subject))
|
|
|
|
mu4e-headers-time-format "%R"
|
|
|
|
mu4e-view-show-addresses t
|
|
|
|
mu4e-view-show-images t
|
|
|
|
mu4e-view-image-max-width 800
|
|
|
|
mu4e-hide-index-messages t
|
|
|
|
|
|
|
|
;; If you're using a dark theme, and the messages are hard to read, it
|
|
|
|
;; can help to change the luminosity, e.g.:
|
|
|
|
shr-color-visible-luminance-min 80
|
|
|
|
|
|
|
|
;; Gmail-style threading.
|
2017-07-24 16:21:33 +02:00
|
|
|
mu4e-headers-include-related t
|
2017-07-19 17:17:24 +02:00
|
|
|
|
|
|
|
;; Because default completion can be extended (e.g. Helm, Ivy).
|
2017-07-25 00:11:29 +02:00
|
|
|
mu4e-completing-read-function 'completing-read)
|
2017-07-19 17:17:24 +02:00
|
|
|
|
2017-07-29 14:00:00 +02:00
|
|
|
;; Press "aV" to view in browser.
|
|
|
|
(add-to-list 'mu4e-view-actions '("ViewInBrowser" . mu4e-action-view-in-browser) t)
|
|
|
|
|
2017-07-24 16:21:33 +02:00
|
|
|
;; Unicode chars for decoration might cause issues with some fonts or in terminals.
|
|
|
|
;; https://github.com/djcb/mu/issues/733
|
|
|
|
;; https://github.com/djcb/mu/issues/1062
|
|
|
|
;; (setq mu4e-use-fancy-chars t)
|
2017-07-19 17:17:24 +02:00
|
|
|
|
2017-07-29 14:00:00 +02:00
|
|
|
;;; REVIEW: Sorting in ascending order is impeded by `mu4e-search-results-limit': the 500 oldest e-mails will be displayed first.
|
2017-07-25 00:11:29 +02:00
|
|
|
;;; https://github.com/djcb/mu/issues/809
|
|
|
|
;; (setq mu4e-headers-sort-direction 'ascending)
|
2017-07-24 16:21:33 +02:00
|
|
|
;;; Since we sort in ascending direction, we default to the end of buffer.
|
2017-07-25 00:11:29 +02:00
|
|
|
;; (add-hook 'mu4e-headers-found-hook 'end-of-buffer)
|
2017-07-19 17:17:24 +02:00
|
|
|
|
|
|
|
(defun mu4e-add-fortune-signature ()
|
|
|
|
(require 'functions) ; For `call-process-to-string'.
|
|
|
|
(setq mu4e-compose-signature
|
|
|
|
(format "%s\n\n%s"
|
|
|
|
user-full-name
|
|
|
|
(call-process-to-string "fortune" "-s"))))
|
|
|
|
(add-hook 'mu4e-compose-pre-hook 'mu4e-add-fortune-signature)
|
|
|
|
|
2017-07-27 17:33:21 +02:00
|
|
|
;; Make unread e-mails stand out a bit.
|
|
|
|
(set-face-foreground 'mu4e-unread-face "yellow")
|
|
|
|
|
2017-07-31 08:58:15 +02:00
|
|
|
(when (require 'helm-mu nil t)
|
|
|
|
(dolist (map (list mu4e-headers-mode-map mu4e-main-mode-map mu4e-view-mode-map))
|
|
|
|
(define-key map "\M-sf" 'helm-mu)))
|
|
|
|
|
2017-07-26 18:40:32 +02:00
|
|
|
(load "~/personal/mail/mu4e.el" t)
|
2017-07-25 00:11:29 +02:00
|
|
|
|
2017-07-19 17:17:24 +02:00
|
|
|
(provide 'init-mu4e)
|