From 16b994b9b6eff136e79c235b246b4a08aa1fe597 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Tue, 21 Apr 2020 11:19:42 +0200 Subject: emacs: removed unneeded mail variables and fixed setup for 27 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There were two variables that were long removed from GNU Emacs (since 24.x, I think). I was setting them anyways and the byte compiler was complaining about it. I used to ignore this warning, but now I want to play nice. Moreover, since upgrading to GNU Emacs 27.x I've noticed that sending emails was broken: it was not able to figure out the GPG key from which to sign emails. I've fixed this by directly telling `mml' which key to use. Signed-off-by: Miquel Sabaté Solà --- .emacs.d/init.org | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.emacs.d/init.org b/.emacs.d/init.org index 66048a7..89e5d68 100644 --- a/.emacs.d/init.org +++ b/.emacs.d/init.org @@ -1301,9 +1301,7 @@ the configuration. (require 'smtpmail) - (setq smtpmail-starttls-credentials '((server port nil nil)) - smtpmail-auth-credentials (expand-file-name "~/.authinfo.gpg") - smtpmail-default-smtp-server server + (setq smtpmail-default-smtp-server server smtpmail-smtp-server server message-send-mail-function 'smtpmail-send-it smtpmail-smtp-service port)) @@ -1454,7 +1452,13 @@ Setting my bookmarks Sign outgoing emails always. #+BEGIN_SRC elisp - (add-hook 'message-send-hook 'mml-secure-message-sign-pgpmime) +;; For some reason, as of GNU Emacs 27.x, I need to define the default openpgp +;; signer so it can automatically pick my only key I have for signing. +(when EMACS-27-OR-LATER + (setq mml-secure-openpgp-signers '("0x96BE8C6FD89D6565") + mml-secure-openpgp-sign-with-sender t)) + +(add-hook 'message-send-hook 'mml-secure-message-sign-pgpmime) #+END_SRC To avoid UID clashes. See [[http://pragmaticemacs.com/emacs/fixing-duplicate-uid-errors-when-using-mbsync-and-mu4e/][this]]. -- cgit v1.2.3