From: Kevin Brubeck Unhammer <unhammer@fsfe.org>
To: info-gnus-english@gnu.org
Subject: signing all mail by default
Date: Wed, 12 Feb 2014 11:32:45 +0100 [thread overview]
Message-ID: <87ioskboz6.fsf@fsfe.org> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 1052 bytes --]
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.
[-- Attachment #1.2: Type: application/pgp-signature, Size: 472 bytes --]
[-- Attachment #2: Type: text/plain, Size: 162 bytes --]
_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english
next reply other threads:[~2014-02-12 10:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-12 10:32 Kevin Brubeck Unhammer [this message]
2014-02-12 11:32 ` Charles Philip Chan
2014-02-12 12:21 ` Kevin Brubeck Unhammer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ioskboz6.fsf@fsfe.org \
--to=unhammer@fsfe.org \
--cc=info-gnus-english@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).