]> git.eshelyaron.com Git - emacs.git/commitdiff
(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 c6b67ccfd73c792437b3dd2fb5181a892ca79f65..c149e208634a211231ad635f96a856d93dc2b882 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 4496f9a9f0015940ce0711063f677d7da99d44f2..1a7d8cb1593f8e4e76fcc3b4cffdc633100be6e5 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 058dbdc548a92a0c51bf07f17df24fbb7c44b7ad..22d9f91648cd9578c96a22520300aace2684c7f2 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" "\