]> code.delx.au - gnu-emacs/commitdiff
* epg.el (epg--start): Check that gpgconf can be found before calling it.
authorIvan Andrus <darthandrus@gmail.com>
Thu, 16 Jul 2015 21:44:20 +0000 (15:44 -0600)
committerIvan Andrus <darthandrus@gmail.com>
Sat, 18 Jul 2015 15:06:46 +0000 (09:06 -0600)
lisp/epg.el

index 4ba96272aaef2733d57c362f223ab5b1cb816170..7e3cec7b2b7b53ba8dccc60257091ba074da66da 100644 (file)
@@ -605,16 +605,17 @@ callback data (if any)."
     ;; Start the Emacs Pinentry server if allow-emacs-pinentry is set
     ;; in ~/.gnupg/gpg-agent.conf.
     (when (and (fboundp 'pinentry-start)
-               (with-temp-buffer
-                 (when (= (call-process epg-gpgconf-program nil t nil
-                                        "--list-options" "gpg-agent")
-                          0)
-                   (goto-char (point-min))
-                   (re-search-forward "^allow-emacs-pinentry:.*:1$" nil t))))
+              (executable-find epg-gpgconf-program)
+              (with-temp-buffer
+                (when (= (call-process epg-gpgconf-program nil t nil
+                                       "--list-options" "gpg-agent")
+                         0)
+                  (goto-char (point-min))
+                  (re-search-forward "^allow-emacs-pinentry:.*:1$" nil t))))
       (pinentry-start))
     (setq process-environment
-          (cons (format "INSIDE_EMACS=%s,epg" emacs-version)
-                process-environment))
+         (cons (format "INSIDE_EMACS=%s,epg" emacs-version)
+               process-environment))
     ;; Record modified time of gpg-agent socket to restore the Emacs
     ;; frame on text terminal in `epg-wait-for-completion'.
     ;; See