[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: selection of GPG key in Gnus
From: |
Teemu Likonen |
Subject: |
Re: selection of GPG key in Gnus |
Date: |
Tue, 10 Jan 2017 16:58:06 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.91 (gnu/linux) |
Hikaru Ichijyo [2017-01-09 22:45:49-06] wrote:
> I'd like to have selection of a default GPG key to use for signing and
> encrypting to happen automatically depending on the group I'm in. I'd
> also like to be able to sign by default (using the correct key) in
> most mail groups, and never sign/encrypt at all in newsgroups.
>
> Basically, what I'd like is some sort of gnus-posting-styles mechanism
> to control PGP behavior...or at the very least, something in the
> group's customize menu.
With Gnus you can do anything you want. Just write code! :-) I'm not
sure how easily you can get that but here is my quick and totally
untested idea:
(setq mml-secure-openpgp-signers nil)
(add-hook 'gnus-message-setup-hook 'my-message-setup)
(defun my-message-setup ()
(when mml-secure-openpgp-signers
(mml-secure-message-sign)))
(setq gnus-parameters
'(("some.group"
(mml-secure-openpgp-signers ("0xABCD1234")))
("other.group"
(mml-secure-openpgp-signers ("0xAABB1122")))
;; ...
))
--
/// Teemu Likonen - .-.. <https://keybase.io/tlikonen> //
// PGP: 4E10 55DC 84E9 DFF6 13D7 8557 719D 69D3 2453 9450 ///
signature.asc
Description: PGP signature