unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Teemu Likonen <tlikonen@iki.fi>
To: Hikaru Ichijyo <ichijyo@macross.sdf.jp>
Cc: help-gnu-emacs@gnu.org
Subject: Re: selection of GPG key in Gnus
Date: Tue, 10 Jan 2017 16:58:06 +0200	[thread overview]
Message-ID: <87pojvc681.fsf@iki.fi> (raw)
In-Reply-To: <8xxr34bjzeq.fsf@village.keycorner.org> (Hikaru Ichijyo's message of "Mon, 09 Jan 2017 22:45:49 -0600")

[-- Attachment #1: Type: text/plain, Size: 1250 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 454 bytes --]

      reply	other threads:[~2017-01-10 14:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-10  4:45 selection of GPG key in Gnus Hikaru Ichijyo
2017-01-10 14:58 ` Teemu Likonen [this message]

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pojvc681.fsf@iki.fi \
    --to=tlikonen@iki.fi \
    --cc=help-gnu-emacs@gnu.org \
    --cc=ichijyo@macross.sdf.jp \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).