[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: PGG: can't encrypt only for myself?
From: |
Chris Moore |
Subject: |
Re: PGG: can't encrypt only for myself? |
Date: |
Wed, 14 Feb 2007 12:31:10 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.93 (gnu/linux) |
Chris Moore <address@hidden> writes:
> the 'encrypt for me' setting is only used if I specify other recipients as
> well:
> I think I would expect pgg-encrypt-for-me to be consulted even if no other
> recipients are specified.
Here's a patch to fix it:
Index: lisp/pgg-gpg.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/pgg-gpg.el,v
retrieving revision 1.21
diff -u -r1.21 pgg-gpg.el
--- lisp/pgg-gpg.el 21 Jan 2007 03:53:11 -0000 1.21
+++ lisp/pgg-gpg.el 14 Feb 2007 11:27:52 -0000
@@ -224,7 +224,7 @@
(list "--batch" "--armor" "--always-trust" "--encrypt")
(if pgg-text-mode (list "--textmode"))
(if sign (list "--sign" "--local-user" pgg-gpg-user-id))
- (if recipients
+ (if (or recipients pgg-encrypt-for-me)
(apply #'nconc
(mapcar (lambda (rcpt)
(list pgg-gpg-recipient-argument rcpt))
Index: lisp/pgg-pgp5.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/pgg-pgp5.el,v
retrieving revision 1.5
diff -u -r1.5 pgg-pgp5.el
--- lisp/pgg-pgp5.el 21 Jan 2007 03:53:11 -0000 1.5
+++ lisp/pgg-pgp5.el 14 Feb 2007 11:27:52 -0000
@@ -155,7 +155,7 @@
(args
(append
`("+NoBatchInvalidKeys=off" "-fat" "+batchmode=1"
- ,@(if recipients
+ ,@(if (or recipients pgg-encrypt-for-me)
(apply #'append
(mapcar (lambda (rcpt)
(list "-r"
Index: lisp/pgg-pgp.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/pgg-pgp.el,v
retrieving revision 1.6
diff -u -r1.6 pgg-pgp.el
--- lisp/pgg-pgp.el 21 Jan 2007 03:53:11 -0000 1.6
+++ lisp/pgg-pgp.el 14 Feb 2007 11:27:52 -0000
@@ -143,7 +143,7 @@
(args
(concat
"+encrypttoself=off +verbose=1 +batchmode +language=us -fate "
- (if recipients
+ (if (or recipients pgg-encrypt-for-me)
(mapconcat 'shell-quote-argument
(append recipients
(if pgg-encrypt-for-me