From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/82479 Path: news.gmane.org!not-for-mail From: Christopher Schmidt Newsgroups: gmane.emacs.gnus.general Subject: Re: Changing GPG encryption for GCC copy Date: Wed, 7 Nov 2012 10:44:28 +0000 (GMT) Message-ID: <87sj8lu1yp@ch.ristopher.com> References: <87ip9hyegx.fsf@rss01.mhs.man.ac.uk> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1352285104 21941 80.91.229.3 (7 Nov 2012 10:45:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 7 Nov 2012 10:45:04 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M30745@lists.math.uh.edu Wed Nov 07 11:45:12 2012 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TW38B-0002Gu-Im for ding-account@gmane.org; Wed, 07 Nov 2012 11:45:11 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1TW37c-0006QD-0N; Wed, 07 Nov 2012 04:44:36 -0600 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1TW37a-0006Pt-4E for ding@lists.math.uh.edu; Wed, 07 Nov 2012 04:44:34 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1TW37Y-0000Zx-I5 for ding@lists.math.uh.edu; Wed, 07 Nov 2012 04:44:33 -0600 Original-Received: from ristopher.com ([146.185.21.93] helo=saturn.ch.ristopher.com) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1TW37W-00088D-9S for ding@gnus.org; Wed, 07 Nov 2012 11:44:30 +0100 Original-Received: by saturn.ch.ristopher.com (Postfix, from userid 0) id 77ABE1FF8A; Wed, 7 Nov 2012 10:44:28 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ch.ristopher.com; s=mail; t=1352285068; bh=AqkKLS57cQ5iw8XzHo76osMMMiaKhinC+Uuz4DhwOFQ=; h=From:To:Subject:In-Reply-To:Message-ID:References:MIME-Version: Content-Type:Date; b=HrZ5zicuj3LeBBZhSwRv0kRk00c00rVYowkviEK99Nw3cHSL/Lrc+f+Rs1AcEgfog FRJcc0b75rc6W1ayCclBAC8EmR8syg3cMuGcswzqDjY1i96YWLE788tpYsinQunQsz GFiXxwA0wkPAprpMs2WMovBDT9/9xxfV7JEwcvyE= In-Reply-To: <87ip9hyegx.fsf@rss01.mhs.man.ac.uk> (Matt Ford's message of "Wed, 07 Nov 2012 09:00:46 +0000") Mail-Followup-To: ding@gnus.org X-Spam-Score: 0.3 (/) X-Spam-Report: SpamAssassin (3.3.1 2010-03-16) analysis follows Bayesian score: 0.4994 Ham tokens: 0.000-1003--6600h-0s--0d--H*i:message, 0.000-350--2302h-0s--0d--H*i:2012, 0.000-78--509h-0s--0d--GCC, 0.000-4303--28383h-8s--0d--GPG, 0.000-7--42h-0s--0d--H*i:Nov Spam tokens: 0.997-1--0h-4s--0d--H*r:sk:christo, 0.995-851--24h-4009s--0d--H*r:quimby.gnus.org, 0.991-786--41h-3787s--0d--H*Ad:D*gnus.org, 0.989-799--52h-3897s--0d--HTo:D*gnus.org, 0.986-841--70h-4172s--0d--HX-Spam-Relays-External:quimby.gnus.org Autolearn status: ham -0.4 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% [score: 0.4994] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:82479 Archived-At: Matt Ford writes: > Inspired by a recent thread I wondered if there was an elegant way of > switching the encryption key used when saving a copy of an encrypted > message via GCC. Check gnus-gcc-pre-body-encode-hook and gnus-gcc-post-body-encode-hook. I have this in my gnus-init.el: (ah gnus-gcc-pre-body-encode-hook (goto-char (message-goto-body)) (while (re-search-forward "^<#\\(secure .*mode=\\(sign\\)?encrypt.*>\\)$" nil t) (replace-match "<|rms\\1"))) (ah gnus-gcc-post-body-encode-hook (goto-char (message-goto-body)) (while (re-search-forward "^<|rms\\(.*\\)$" nil t) (replace-match "<#\\1"))) Christopher