(allout-encrypt-string): Recognize epg failure to decrypt gpg2 armored text
authorKen Manheimer <ken.manheimer@gmail.com>
Thu, 17 Feb 2011 22:57:38 +0000 (17:57 -0500)
committerKen Manheimer <ken.manheimer@gmail.com>
Thu, 17 Feb 2011 22:57:38 +0000 (17:57 -0500)
using gpg1, and add indication the gpg version *might* be the problem in
the error message.

lisp/ChangeLog
lisp/allout.el
lisp/dired.el

index c6b67cc..c149e20 100644 (file)
@@ -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  <deniz.a.m.dogan@gmail.com>
 
index 4496f9a..1a7d8cb 100644 (file)
@@ -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
index 058dbdc..22d9f91 100644 (file)
@@ -4029,7 +4029,7 @@ true then the type of the file linked to by FILE is printed instead.
 ;;;***
 \f
 ;;;### (autoloads (dired-do-relsymlink dired-jump) "dired-x" "dired-x.el"
-;;;;;;  "d35468f85920d324895b0c04bb703328")
+;;;;;;  "a2af6147cf06b53166d9e1a3bb200675")
 ;;; Generated autoloads from dired-x.el
 
 (autoload 'dired-jump "dired-x" "\