emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 644dd2f: Make the error message in epa-display-error more helpful


From: Lars Ingebrigtsen
Subject: master 644dd2f: Make the error message in epa-display-error more helpful
Date: Fri, 3 Dec 2021 23:39:54 -0500 (EST)

branch: master
commit 644dd2f05059401116caf6c6e3574a2ac763e667
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Make the error message in epa-display-error more helpful
    
    * lisp/epa.el (epa-display-error): Output a more helpful error
    message when reading a keyring file (bug#12923).
---
 lisp/epa.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lisp/epa.el b/lisp/epa.el
index e4b89e9..93c85bf 100644
--- a/lisp/epa.el
+++ b/lisp/epa.el
@@ -607,7 +607,11 @@ If SECRET is non-nil, list secret keys instead of public 
keys."
                       (_ "Error while executing \"%s\":\n\n"))
                     (epg-context-program context))
                    "\n\n"
-                   (epg-context-error-output context)))
+                   (epg-context-error-output context)
+                    (if (string-search "Unexpected error"
+                                       (epg-context-error-output context))
+                        "\n(File possibly not an encrypted file, but is 
perhaps a key ring file?)\n"
+                      "")))
          (epa-info-mode)
          (goto-char (point-min)))
        (display-buffer buffer)))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]