From c7548f30622665198145067d32e44c2348ff7fbc Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Fri, 21 Apr 2017 14:45:53 +0200 Subject: Emacs: Move insensitive email configuration to init.org --- emacs/.emacs.d/init.org | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) (limited to 'emacs/.emacs.d/init.org') diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index aa7add4..43a861d 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -1181,6 +1181,52 @@ rather useful. (setq eldoc-idle-delay 0.1) (eldoc-add-command 'paredit-backward-delete 'paredit-close-round))) #+END_SRC +* Mail + +** Gnus + +At work, I use gnus for email. Some of the setup is specific to my +workplace, so I keep it in a host-specific, GPG-encrypted file. + +#+BEGIN_SRC emacs-lisp +(use-package gnus + :config (progn + (setq gnus-gcc-mark-as-read t + mml-secure-openpgp-encrypt-to-self t + send-mail-function #'smtpmail-send-it + message-send-mail-function #'smtpmail-send-it))) + +(with-eval-after-load 'gnus-mime + (define-key gnus-mime-button-map " " #'gnus-mime-view-part-externally)) + +(with-eval-after-load "mailcap" + (when (eq system-type 'darwin) + (mailcap-add-mailcap-entry "application" "pdf" '((viewer . "/usr/bin/qlmanage -p %s") (type . "application/pdf"))))) + +(with-eval-after-load "mm-decode" + (add-to-list 'mm-discouraged-alternatives "text/html") + (add-to-list 'mm-discouraged-alternatives "text/richtext")) +#+END_SRC + +** BBDB + +As I'm using Emacs for email, it makes sense to have contact +information here as well. + +#+BEGIN_SRC emacs-lisp +(use-package bbdb + :config (progn + (bbdb-initialize 'gnus 'mail 'message 'pgp) + (bbdb-mua-auto-update-init 'gnus 'message) + (setq bbdb-send-mail-style 'gnus + bbdb-complete-mail-allow-cycling t + bbdb-mua-auto-update t + bbdb-mua-update-interactive-p '(query . create) + bbdb-message-all-addresses t + bbdb-offer-save t + bbdb-offer-to-create 1))) +#+END_SRC + * Misc #+BEGIN_SRC emacs-lisp -- cgit 1.4.1