From 178f6af8845a369ff22ba82c72a03a073320aff5 Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Sun, 19 Jun 2016 22:07:47 -0400 Subject: [PATCH] Loopback pinentry for GPG v2 --- emacs.d/emacs.org | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/emacs.d/emacs.org b/emacs.d/emacs.org index 758b2d9..53c43e5 100644 --- a/emacs.d/emacs.org +++ b/emacs.d/emacs.org @@ -916,11 +916,10 @@ The GPG pinentry dialog is a neat console-based dialog that consumes the TTY and prompts for a password. In general, this works well; with Emacs, I noticed that it fights for input. -To avoid the problem, I disable pinentry indirectly by clearing out the -=GPG_AGENT_INFO= environment variable. +As long as =allow-loopback-pinentry= is set in =gpg-agent.conf=, =loopback= +can be set as the pinentry mode, which allows the caller to handle the +request. In our case, that means that the minibuffer will be used. #+BEGIN_SRC emacs-lisp - (defadvice epg--start (around advice-epg-disable-agent activate) - (setenv "GPG_AGENT_INFO" nil) - ad-do-it) + (setq epa-pinentry-mode 'loopback) #+END_SRC