Commit 85bc1074 authored by Daiki Ueno's avatar Daiki Ueno
Browse files

pinentry.el: Add debugging support

* lisp/net/pinentry.el (pinentry-debug): New variable.
(pinentry-debug-buffer): New variable.
(pinentry--process-filter): Send input to the debug buffer, if
`pinentry-debug' is set.
parent 93fb1783
......@@ -63,6 +63,8 @@
:type 'integer
:group 'pinentry)
(defvar pinentry-debug nil)
(defvar pinentry-debug-buffer nil)
(defvar pinentry--server-process nil)
(defvar pinentry--connection-process-list nil)
......@@ -293,6 +295,13 @@ Assuan protocol."
(setq pinentry--read-point (point-min))
(make-local-variable 'pinentry--labels))))
(with-current-buffer (process-buffer process)
(when pinentry-debug
(or pinentry-debug-buffer
(setq pinentry-debug-buffer (generate-new-buffer
" *pinentry-debug*")))
(goto-char (point-max))
(insert input)))
(goto-char (point-max))
(insert input)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment