mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-27 10:54:40 +00:00
* epg.el (epg--start): Check that gpgconf can be found before calling it.
This commit is contained in:
parent
ea1a30223e
commit
5d72d5d1f4
17
lisp/epg.el
17
lisp/epg.el
@ -605,16 +605,17 @@ callback data (if any)."
|
|||||||
;; Start the Emacs Pinentry server if allow-emacs-pinentry is set
|
;; Start the Emacs Pinentry server if allow-emacs-pinentry is set
|
||||||
;; in ~/.gnupg/gpg-agent.conf.
|
;; in ~/.gnupg/gpg-agent.conf.
|
||||||
(when (and (fboundp 'pinentry-start)
|
(when (and (fboundp 'pinentry-start)
|
||||||
(with-temp-buffer
|
(executable-find epg-gpgconf-program)
|
||||||
(when (= (call-process epg-gpgconf-program nil t nil
|
(with-temp-buffer
|
||||||
"--list-options" "gpg-agent")
|
(when (= (call-process epg-gpgconf-program nil t nil
|
||||||
0)
|
"--list-options" "gpg-agent")
|
||||||
(goto-char (point-min))
|
0)
|
||||||
(re-search-forward "^allow-emacs-pinentry:.*:1$" nil t))))
|
(goto-char (point-min))
|
||||||
|
(re-search-forward "^allow-emacs-pinentry:.*:1$" nil t))))
|
||||||
(pinentry-start))
|
(pinentry-start))
|
||||||
(setq process-environment
|
(setq process-environment
|
||||||
(cons (format "INSIDE_EMACS=%s,epg" emacs-version)
|
(cons (format "INSIDE_EMACS=%s,epg" emacs-version)
|
||||||
process-environment))
|
process-environment))
|
||||||
;; Record modified time of gpg-agent socket to restore the Emacs
|
;; Record modified time of gpg-agent socket to restore the Emacs
|
||||||
;; frame on text terminal in `epg-wait-for-completion'.
|
;; frame on text terminal in `epg-wait-for-completion'.
|
||||||
;; See
|
;; See
|
||||||
|
Loading…
Reference in New Issue
Block a user