aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaiki Ueno2012-12-21 16:21:35 +0900
committerDaiki Ueno2012-12-21 16:21:35 +0900
commitc660916409de757a7f99036df226da3eed32f55e (patch)
tree924c056728b1daa52ad522c695ccdf5b2c4d53b4
parentaa26f345096166bd8c135876dbab9b671ae232e3 (diff)
downloademacs-c660916409de757a7f99036df226da3eed32f55e.tar.gz
emacs-c660916409de757a7f99036df226da3eed32f55e.zip
* epg.el (epg--start): Print GPG_AGENT_INFO in the debug buffer.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/epg.el11
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 @@
12012-12-21 Daiki Ueno <ueno@gnu.org>
2
3 * epg.el (epg--start): Print GPG_AGENT_INFO in the debug buffer.
4
12012-12-21 Chong Yidong <cyd@gnu.org> 52012-12-21 Chong Yidong <cyd@gnu.org>
2 6
3 * simple.el (transpose-subr-1): Preserve marker positions by 7 * 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."
1130 (if (eq (epg-context-protocol context) 'CMS) 1130 (if (eq (epg-context-protocol context) 'CMS)
1131 epg-gpgsm-program 1131 epg-gpgsm-program
1132 epg-gpg-program))) 1132 epg-gpg-program)))
1133 (let* ((args (append (list "--no-tty" 1133 (let* ((agent-info (getenv "GPG_AGENT_INFO"))
1134 (args (append (list "--no-tty"
1134 "--status-fd" "1" 1135 "--status-fd" "1"
1135 "--yes") 1136 "--yes")
1136 (if (and (not (eq (epg-context-protocol context) 'CMS)) 1137 (if (and (not (eq (epg-context-protocol context) 'CMS))
1137 (string-match ":" (or (getenv "GPG_AGENT_INFO") 1138 (string-match ":" (or agent-info "")))
1138 "")))
1139 '("--use-agent")) 1139 '("--use-agent"))
1140 (if (and (not (eq (epg-context-protocol context) 'CMS)) 1140 (if (and (not (eq (epg-context-protocol context) 'CMS))
1141 (epg-context-progress-callback context)) 1141 (epg-context-progress-callback context))
@@ -1161,7 +1161,10 @@ This function is for internal use only."
1161 (setq epg-debug-buffer (generate-new-buffer " *epg-debug*"))) 1161 (setq epg-debug-buffer (generate-new-buffer " *epg-debug*")))
1162 (set-buffer epg-debug-buffer) 1162 (set-buffer epg-debug-buffer)
1163 (goto-char (point-max)) 1163 (goto-char (point-max))
1164 (insert (format "%s %s\n" 1164 (insert (if agent-info
1165 (format "GPG_AGENT_INFO=%s\n" agent-info)
1166 "GPG_AGENT_INFO is not set\n")
1167 (format "%s %s\n"
1165 (if (eq (epg-context-protocol context) 'CMS) 1168 (if (eq (epg-context-protocol context) 'CMS)
1166 epg-gpgsm-program 1169 epg-gpgsm-program
1167 epg-gpg-program) 1170 epg-gpg-program)