From 2a095cec7ae4b3e076bcb0aba542248c3660e158 Mon Sep 17 00:00:00 2001 From: Ken Manheimer Date: Thu, 17 Feb 2011 17:57:38 -0500 Subject: [PATCH] (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. --- lisp/ChangeLog | 3 +++ lisp/allout.el | 11 ++++++++--- lisp/dired.el | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c6b67ccfd73..c149e208634 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -4,6 +4,9 @@ (allout-widgets-icons-dark-subdir): Track relocations of icons * lisp/allout.el: Remove commentary about remove encryption passphrase mnemonic support and verification. + (allout-encrypt-string): (allout-encrypt-string): Recognize epg + failure to decrypt gpg2 armored text using gpg1, and indicate that + the gpg version *might* be the problem in the error message. 2011-02-17 Deniz Dogan 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 diff --git a/lisp/dired.el b/lisp/dired.el index 058dbdc548a..22d9f91648c 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -4029,7 +4029,7 @@ true then the type of the file linked to by FILE is printed instead. ;;;*** ;;;### (autoloads (dired-do-relsymlink dired-jump) "dired-x" "dired-x.el" -;;;;;; "d35468f85920d324895b0c04bb703328") +;;;;;; "a2af6147cf06b53166d9e1a3bb200675") ;;; Generated autoloads from dired-x.el (autoload 'dired-jump "dired-x" "\ -- 2.39.5