[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
signing all mail by default
From: |
Kevin Brubeck Unhammer |
Subject: |
signing all mail by default |
Date: |
Wed, 12 Feb 2014 11:32:45 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
I would love to simply say
(add-hook 'message-setup-hook 'mml-secure-message-sign)
and have all mail signed by default. Unfortunately, this hook is called
before gnus inserts reply text (so the <#secure thing is put below
quoted text) and for certain emails even makes my Emacs hang (with 100 %
CPU usage).
So instead, I use this mess to sign all email by default (both for
global shortcut C-x m and for R/F/r/f/a from gnus):
(defadvice gnus-summary-handle-replysign (before always-sign activate)
;; the function itself may override this to encrypt as well.
(mml-secure-message-sign))
(defun mml-sign-unless-called-by-gnus ()
(unless (boundp 'article)
;; If we're called by gnus, article is bound (yes, this is hacky)
(mml-secure-message-sign)))
(add-hook 'message-setup-hook 'mml-sign-unless-called-by-gnus)
Is there a less hacky way?
--
Kevin Brubeck Unhammer
Never attribute to malice that which is adequately explained by
incompetence or laziness.
pgpbyGOzwe6T2.pgp
Description: PGP signature
- signing all mail by default,
Kevin Brubeck Unhammer <=