From d1bf36ed1e8dc1a3ec5d2a99aa6d335dd3381246 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Tue, 7 Mar 2017 16:30:48 +0100 Subject: Emacs: Fix loading private elisp --- tag-emacs/emacs.d/init.org | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'tag-emacs') 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. -- cgit 1.4.1