From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Teemu Likonen Newsgroups: gmane.emacs.help Subject: Re: selection of GPG key in Gnus Date: Tue, 10 Jan 2017 16:58:06 +0200 Message-ID: <87pojvc681.fsf@iki.fi> References: <8xxr34bjzeq.fsf@village.keycorner.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Trace: blaine.gmane.org 1484060410 9154 195.159.176.226 (10 Jan 2017 15:00:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 10 Jan 2017 15:00:10 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.91 (gnu/linux) Cc: help-gnu-emacs@gnu.org To: Hikaru Ichijyo Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jan 10 16:00:06 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cQxtt-0000N8-Ls for geh-help-gnu-emacs@m.gmane.org; Tue, 10 Jan 2017 15:59:49 +0100 Original-Received: from localhost ([::1]:47834 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cQxtx-0005kv-Ul for geh-help-gnu-emacs@m.gmane.org; Tue, 10 Jan 2017 09:59:53 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60270) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cQxtG-0005jS-0n for help-gnu-emacs@gnu.org; Tue, 10 Jan 2017 09:59:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cQxtC-0002Zj-WA for help-gnu-emacs@gnu.org; Tue, 10 Jan 2017 09:59:10 -0500 Original-Received: from mail.kapsi.fi ([217.30.184.167]:52510) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cQxtC-0002Y9-Ou for help-gnu-emacs@gnu.org; Tue, 10 Jan 2017 09:59:06 -0500 Original-Received: from dsl-roibrasgw1-54fb8f-106.dhcp.inet.fi ([84.251.143.106] helo=mithlond.arda) by mail.kapsi.fi with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1cQxsK-0000ZV-FO; Tue, 10 Jan 2017 16:58:12 +0200 Original-Received: from dtw by mithlond.arda with local (Exim 4.84_2) (envelope-from ) id 1cQxsK-0000rJ-2l; Tue, 10 Jan 2017 16:58:12 +0200 In-Reply-To: <8xxr34bjzeq.fsf@village.keycorner.org> (Hikaru Ichijyo's message of "Mon, 09 Jan 2017 22:45:49 -0600") X-SA-Exim-Connect-IP: 84.251.143.106 X-SA-Exim-Mail-From: tlikonen@iki.fi X-SA-Exim-Scanned: No (on mail.kapsi.fi); SAEximRunCond expanded to false X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 217.30.184.167 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:112077 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable 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"))) ;; ... )) =2D-=20 /// Teemu Likonen - .-.. // // PGP: 4E10 55DC 84E9 DFF6 13D7 8557 719D 69D3 2453 9450 /// --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBCAAGBQJYdPZ+AAoJEJM6NQQefq1RI50H/2fkVs11HZW6Gih7JeQRVlSs j3SgbyugfzSo6MtxTqXhLLVQ5Wyct+nCPSXYQUjLRVWAIwloPKQ137FTkItxcuO2 9np/kkLf/p81LKkdB9Hn6YumfCLyzk0WCq7adPSzVEKK2C+wkobioOB4TwnTMZ7R dZkio67K0+csnd1jHyhMqnQV5ex3LiQaDQyRLbjXtv/6kp8H3YbHzkNisToDAfpX TaE/6UqqnSvHstXQja69KT/yoBzJ/uTYesMDmTaS7viyEiMBBiX6sFzNN2tWP2C+ Fx9618o1b4EpwafrXpwfUAuswfdSgStJYHs+nFLIsmgn0IpCa5TEKdSm6KteBBg= =S0CH -----END PGP SIGNATURE----- --=-=-=--