Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* signing all mail by default
@ 2014-02-12 10:32 Kevin Brubeck Unhammer
  2014-02-12 11:32 ` Charles Philip Chan
  0 siblings, 1 reply; 3+ messages in thread
From: Kevin Brubeck Unhammer @ 2014-02-12 10:32 UTC (permalink / raw)
  To: info-gnus-english


[-- 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-02-12 12:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-12 10:32 signing all mail by default Kevin Brubeck Unhammer
2014-02-12 11:32 ` Charles Philip Chan
2014-02-12 12:21   ` Kevin Brubeck Unhammer

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).