emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r111285: * epg.el (epg--start): Print


From: Daiki Ueno
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r111285: * epg.el (epg--start): Print GPG_AGENT_INFO in the debug buffer.
Date: Fri, 21 Dec 2012 16:21:35 +0900
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 111285
committer: Daiki Ueno <address@hidden>
branch nick: trunk
timestamp: Fri 2012-12-21 16:21:35 +0900
message:
  * epg.el (epg--start): Print GPG_AGENT_INFO in the debug buffer.
modified:
  lisp/ChangeLog
  lisp/epg.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-12-21 05:42:59 +0000
+++ b/lisp/ChangeLog    2012-12-21 07:21:35 +0000
@@ -1,3 +1,7 @@
+2012-12-21  Daiki Ueno  <address@hidden>
+
+       * epg.el (epg--start): Print GPG_AGENT_INFO in the debug buffer.
+
 2012-12-21  Chong Yidong  <address@hidden>
 
        * simple.el (transpose-subr-1): Preserve marker positions by

=== modified file 'lisp/epg.el'
--- a/lisp/epg.el       2012-09-25 04:13:02 +0000
+++ b/lisp/epg.el       2012-12-21 07:21:35 +0000
@@ -1130,12 +1130,12 @@
             (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 @@
            (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)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]