summaryrefslogtreecommitdiff
path: root/lisp/epg.el
diff options
context:
space:
mode:
authorIvan Andrus <darthandrus@gmail.com>2015-07-16 15:44:20 -0600
committerIvan Andrus <darthandrus@gmail.com>2015-07-18 09:06:46 -0600
commit5d72d5d1f4d105556196d99f0ea3838dfedd2f10 (patch)
tree247bb83f19561938aed29152f3afacc2893985fd /lisp/epg.el
parentea1a30223e14ff13e19d15ab8ac17d7aef5242f1 (diff)
downloademacs-5d72d5d1f4d105556196d99f0ea3838dfedd2f10.tar.gz
* epg.el (epg--start): Check that gpgconf can be found before calling it.
Diffstat (limited to 'lisp/epg.el')
-rw-r--r--lisp/epg.el17
1 files changed, 9 insertions, 8 deletions
diff --git a/lisp/epg.el b/lisp/epg.el
index 4ba96272aae..7e3cec7b2b7 100644
--- a/lisp/epg.el
+++ b/lisp/epg.el
@@ -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