summaryrefslogtreecommitdiff
path: root/lisp/allout.el
diff options
context:
space:
mode:
authorKen Manheimer <ken.manheimer@gmail.com>2011-02-17 17:57:38 -0500
committerKen Manheimer <ken.manheimer@gmail.com>2011-02-17 17:57:38 -0500
commit2a095cec7ae4b3e076bcb0aba542248c3660e158 (patch)
tree3a62369ce1dc29d76475bae0d68992b9502437d9 /lisp/allout.el
parent3a00a36316bcc52882c13351df11bcd39bad5c1a (diff)
downloademacs-2a095cec7ae4b3e076bcb0aba542248c3660e158.tar.gz
(allout-encrypt-string): Recognize epg failure to decrypt gpg2 armored text
using gpg1, and add indication the gpg version *might* be the problem in the error message.
Diffstat (limited to 'lisp/allout.el')
-rw-r--r--lisp/allout.el11
1 files changed, 8 insertions, 3 deletions
diff --git a/lisp/allout.el b/lisp/allout.el
index 4496f9a9f00..1a7d8cb1593 100644
--- a/lisp/allout.el
+++ b/lisp/allout.el
@@ -6086,9 +6086,14 @@ signal."
(setq result-text
(if decrypt
- (epg-decrypt-string epg-context
- (encode-coding-string massaged-text
- (or encoding 'utf-8)))
+ (condition-case err
+ (epg-decrypt-string epg-context
+ (encode-coding-string massaged-text
+ (or encoding 'utf-8)))
+ (epg-error
+ (signal 'egp-error
+ (cons (concat (cadr err) " - gpg version problem?")
+ (cddr err)))))
(replace-regexp-in-string "\n$" ""
(epg-encrypt-string epg-context
(encode-coding-string massaged-text