diff options
author | Alan Pearce | 2017-03-07 16:30:48 +0100 |
---|---|---|
committer | Alan Pearce | 2017-03-07 16:30:48 +0100 |
commit | d1bf36ed1e8dc1a3ec5d2a99aa6d335dd3381246 (patch) | |
tree | fc4e5c66515cecb21c77cba810785f3664a9c097 /tag-emacs/emacs.d | |
parent | 3eb1cb331f686b37d752bdfbb690631eae2df4db (diff) | |
download | nixfiles-d1bf36ed1e8dc1a3ec5d2a99aa6d335dd3381246.tar.lz nixfiles-d1bf36ed1e8dc1a3ec5d2a99aa6d335dd3381246.tar.zst nixfiles-d1bf36ed1e8dc1a3ec5d2a99aa6d335dd3381246.zip |
Emacs: Fix loading private elisp
Diffstat (limited to 'tag-emacs/emacs.d')
-rw-r--r-- | tag-emacs/emacs.d/init.org | 17 |
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. |