forked from magnars/.emacs.d
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup-mu4e.el
42 lines (33 loc) · 1.24 KB
/
setup-mu4e.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
(require 'mu4e)
(setq mu4e-get-mail-command "offlineimap")
(setq message-kill-buffer-on-exit t)
;; don't save message to Sent Messages, Gmail/IMAP takes care of this
(setq mu4e-sent-messages-behavior 'delete)
;; don't prompt for applying of marks, just apply
(setq mu4e-headers-leave-behavior 'apply)
;; Try to display images in mu4e
(setq
mu4e-view-show-images t
mu4e-view-image-max-width 800)
;; use imagemagick, if available
(when (fboundp 'imagemagick-register-types)
(imagemagick-register-types))
(setq mu4e-confirm-quit nil
mu4e-headers-date-format "%d/%b/%Y %H:%M" ; date format
mu4e-html2text-command "html2text -utf8 -width 72")
;; Start mu4e in fullscreen, immediately ping for new mail
(defun mu4e-up-to-date-status ()
(interactive)
(window-configuration-to-register :mu4e-fullscreen)
(mu4e)
(mu4e-update-mail-show-window)
(delete-other-windows))
;; Restore previous window configuration
(defun mu4e-quit-session ()
"Restores the previous window configuration and kills the magit buffer"
(interactive)
(kill-buffer)
(jump-to-register :mu4e-fullscreen))
(define-key mu4e-main-mode-map (kbd "q") 'mu4e-quit-session)
(define-key mu4e-headers-mode-map (kbd "M-u") 'mu4e-update-mail-show-window)
(provide 'setup-mu4e)