From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/82105 Path: news.gmane.org!not-for-mail From: Matt Ford Newsgroups: gmane.emacs.gnus.general Subject: Re: gnus-sync and automated GPG encryption Date: Sun, 29 Jul 2012 13:10:54 +0100 Organization: Dancingfrog Message-ID: <87394a938x.fsf@dancingfrog.co.uk> References: <87394r5ofj.fsf@dancingfrog.co.uk> <87wr21npp1.fsf@lifelogs.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1343563972 9785 80.91.229.3 (29 Jul 2012 12:12:52 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 29 Jul 2012 12:12:52 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M30374@lists.math.uh.edu Sun Jul 29 14:12:53 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 1SvSMc-0008JN-Lo for ding-account@gmane.org; Sun, 29 Jul 2012 14:12:50 +0200 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 1SvSL7-0007HX-4x; Sun, 29 Jul 2012 07:11:17 -0500 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1SvSL5-0007HS-O2 for ding@lists.math.uh.edu; Sun, 29 Jul 2012 07:11:15 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1SvSL2-0000tQ-0Z for ding@lists.math.uh.edu; Sun, 29 Jul 2012 07:11:15 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1SvSL0-0005r3-0A for ding@gnus.org; Sun, 29 Jul 2012 14:11:10 +0200 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1SvSKy-0007YQ-BP for ding@gnus.org; Sun, 29 Jul 2012 14:11:08 +0200 Original-Received: from rain.gmane.org ([80.91.229.7]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 29 Jul 2012 14:11:08 +0200 Original-Received: from matt by rain.gmane.org with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 29 Jul 2012 14:11:08 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 26 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: rain.gmane.org User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.1 (gnu/linux) Cancel-Lock: sha1:Yuw2xBwEdjFxh56Wl4pLCxPWmWE= X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:82105 Archived-At: I sorted this if anyone is interested...basically one has to declare the epa-file-encrypt variable as local for it to be picked up by tramp and epa. So in your gnus config you can do this (setq gnus-sync-crypt-key "Matt Ford") and providing you patch gnus-sync-save to with the below, if you try and save a file with a gpg extension it will be encrypted using the key that matches (and it will be transparent if you use gpg-agent). diff --git a/site-elisp/gnus/gnus-sync.el b/site-elisp/gnus/gnus-sync.el index eb11676..a5a8524 100644 --- a/site-elisp/gnus/gnus-sync.el +++ b/site-elisp/gnus/gnus-sync.el @@ -755,6 +755,8 @@ With a prefix, FORCE is set and all groups will be saved." (let ((gnus-sync-newsrc-loader (gnus-sync-newsrc-loader-builder))) (with-temp-file gnus-sync-backend (progn + (setq epa-file-encrypt-to gnus-sync-crypt-key) + (make-local-variable 'epa-file-encrypt-to) (let ((coding-system-for-write gnus-ding-file-coding-system) (standard-output (current-buffer))) (princ (format ";; -*- mode:emacs-lisp; coding: %s; -*-\n" -- Matt