summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2017-04-21 14:45:53 +0200
committerAlan Pearce2017-04-21 14:45:53 +0200
commitc7548f30622665198145067d32e44c2348ff7fbc (patch)
tree429e7e874c29a5f0c655fd3ed3cbaf62a705d89e
parentbb3bc1ebb361f41febc7542b153ba1e92a88aa80 (diff)
downloaddotfiles-c7548f30622665198145067d32e44c2348ff7fbc.tar.lz
dotfiles-c7548f30622665198145067d32e44c2348ff7fbc.tar.zst
dotfiles-c7548f30622665198145067d32e44c2348ff7fbc.zip
Emacs: Move insensitive email configuration to init.org
-rw-r--r--emacs/.emacs.d/ap-spotcap.local.el.gpgbin2468 -> 2136 bytes
-rw-r--r--emacs/.emacs.d/init.org46
2 files changed, 46 insertions, 0 deletions
diff --git a/emacs/.emacs.d/ap-spotcap.local.el.gpg b/emacs/.emacs.d/ap-spotcap.local.el.gpg
index f29f0d0..e8c7590 100644
--- a/emacs/.emacs.d/ap-spotcap.local.el.gpg
+++ b/emacs/.emacs.d/ap-spotcap.local.el.gpg
Binary files differdiff --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