diff options
| author | Daiki Ueno <ueno@gnu.org> | 2012-12-21 16:21:35 +0900 |
|---|---|---|
| committer | Daiki Ueno <ueno@gnu.org> | 2012-12-21 16:21:35 +0900 |
| commit | c660916409de757a7f99036df226da3eed32f55e (patch) | |
| tree | 924c056728b1daa52ad522c695ccdf5b2c4d53b4 /lisp | |
| parent | aa26f345096166bd8c135876dbab9b671ae232e3 (diff) | |
| download | emacs-c660916409de757a7f99036df226da3eed32f55e.tar.gz | |
* epg.el (epg--start): Print GPG_AGENT_INFO in the debug buffer.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/epg.el | 11 |
2 files changed, 11 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a26fc63fa49..d3c83e7e564 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2012-12-21 Daiki Ueno <ueno@gnu.org> + + * epg.el (epg--start): Print GPG_AGENT_INFO in the debug buffer. + 2012-12-21 Chong Yidong <cyd@gnu.org> * simple.el (transpose-subr-1): Preserve marker positions by diff --git a/lisp/epg.el b/lisp/epg.el index b0e01bc3721..ea97ddd747c 100644 --- a/lisp/epg.el +++ b/lisp/epg.el @@ -1130,12 +1130,12 @@ This function is for internal use only." (if (eq (epg-context-protocol context) 'CMS) epg-gpgsm-program epg-gpg-program))) - (let* ((args (append (list "--no-tty" + (let* ((agent-info (getenv "GPG_AGENT_INFO")) + (args (append (list "--no-tty" "--status-fd" "1" "--yes") (if (and (not (eq (epg-context-protocol context) 'CMS)) - (string-match ":" (or (getenv "GPG_AGENT_INFO") - ""))) + (string-match ":" (or agent-info ""))) '("--use-agent")) (if (and (not (eq (epg-context-protocol context) 'CMS)) (epg-context-progress-callback context)) @@ -1161,7 +1161,10 @@ This function is for internal use only." (setq epg-debug-buffer (generate-new-buffer " *epg-debug*"))) (set-buffer epg-debug-buffer) (goto-char (point-max)) - (insert (format "%s %s\n" + (insert (if agent-info + (format "GPG_AGENT_INFO=%s\n" agent-info) + "GPG_AGENT_INFO is not set\n") + (format "%s %s\n" (if (eq (epg-context-protocol context) 'CMS) epg-gpgsm-program epg-gpg-program) |
