summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--tag-emacs/emacs.d/init.org17
1 files changed, 7 insertions, 10 deletions
diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org
index d0bc2994..e8557f35 100644
--- a/tag-emacs/emacs.d/init.org
+++ b/tag-emacs/emacs.d/init.org
@@ -1261,8 +1261,7 @@ rather useful.
 ** Auxillary Configuration
 
 #+BEGIN_SRC emacs-lisp
-;; (require 'pinentry)
-;; (require 'epa)
+(require 'pinentry)
 
 (defvar have-private-key
   (file-exists-p (expand-file-name "secring.gpg" "~/.gnupg/")))
@@ -1293,24 +1292,22 @@ rather useful.
     (unless (getenv "GPG_AGENT_INFO")
       (start-process "gpg-agent" nil "gpg-agent" "--daemon")
       (setenv "SSH_AUTH_SOCK" gpg-agent-ssh-sock))
-    (setq password-cache-expiry nil
-          pinentry--socket-dir temporary-file-directory)
+    (setq password-cache-expiry nil)
     (unless (file-exists-p (concat pinentry--socket-dir "pinentry"))
       (pinentry-start)
       (add-hook 'kill-emacs-hook 'pinentry-stop))
     (add-to-list 'load-suffixes ".el.gpg")
-    (load-gpg "private")
-    (kill-buffer "*Pinentry*")))
+    (load-gpg (expand-file-name "private" user-emacs-directory))))
 
 (defun first-frame-hook (frame)
-  (remove-hook 'after-make-frame-functions 'first-frame-hook)
+  (remove-hook 'after-make-frame-functions #'first-frame-hook)
   (run-at-time nil nil 'load-private-data))
 
-(add-hook 'after-make-frame-functions 'first-frame-hook)
+(if (eq 1 (length (frame-list)))
+    (add-hook 'after-init-hook #'load-private-data)
+  (add-hook 'after-make-frame-functions #'first-frame-hook))
 #+END_SRC
 
-
-
 * Minibuffer
 
 Sometimes I want to use the minibuffer, but I’m already inside it.