+* Email
+** Message Mode
+#+BEGIN_SRC emacs-lisp
+ (use-package post
+ :config
+ (setq post-email-address "don@donarmstrong.com")
+ (setq post-kill-quoted-sig nil)
+ (setq post-mail-message "mutt\\(ng\\|\\)-[a-z0-9]+-[0-9]+-.*")
+ (setq post-uses-fill-mode nil)
+ )
+#+END_SRC
+** Mutt
+*** Message-mode
+#+BEGIN_SRC emacs-lisp
+ (use-package message-mode
+
+ :mode "muttng-[a-z0-9]+-[0-9]+-"
+ :mode "mutt-[a-z0-9]+-[0-9]+-"
+ :hook 'my/message-mode-settings
+ :hook 'turn-on-flyspell
+ :bind (:map message-mode-map
+ ("C-c C-a" . my/post-attach-file))
+ :config
+ (defun my/message-mode-settings ()
+ (font-lock-add-keywords nil
+ '(("^[ \t]*>[ \t]*>[ \t]*>.*$"
+ (0 'message-multiply-quoted-text-face))
+ ("^[ \t]*>[ \t]*>.*$"
+ (0 'message-double-quoted-text-face))))
+ )
+
+ (defun my/post-attach-file ()
+ "Prompt for an attachment."
+ (interactive)
+ (let ((file (read-file-name "Attach file: " nil nil t nil))
+ (description (string-read "Description: ")))
+ (my/header-attach-file file description)))
+
+ (defun my/header-attach-file (file description)
+ "Attach a FILE to the current message (works with Mutt).
+ Argument DESCRIPTION MIME description."
+ (interactive "fAttach file: \nsDescription: ")
+ (when (> (length file) 0)
+ (save-excursion
+ (save-match-data
+ (save-restriction
+ (widen)
+ (goto-char (point-min))
+ (search-forward-regexp "^$")
+ (insert (concat "Attach: " (replace-regexp-in-string "\\([[:space:]\\]\\)" "\\\\\\1" (file-truename file)) " "
+ description "\n"))
+ (message (concat "Attached '" file "'."))
+ (setq post-has-attachment t))))))
+
+ (setq mail-yank-prefix "> ")
+ )
+#+END_SRC
+*** Muttrc mode
+#+BEGIN_SRC emacs-lisp
+ (use-package muttrc-mode
+ :mode "muttngrc"
+ :mode "muttrc"
+ )
+
+#+END_SRC
+* Base emacs
+** Reverting buffers
+#+BEGIN_SRC emacs-lisp
+ (setq global-auto-revert-non-file-buffers t
+ global-auto-revert-ignore-modes '(pdf-view-mode)
+ auto-revert-verbose nil)
+ (global-auto-revert-mode 1)
+#+END_SRC