Skip to content

Instantly share code, notes, and snippets.

@nicferrier
Created October 30, 2014 04:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nicferrier/49f34d6936814a457331 to your computer and use it in GitHub Desktop.
Save nicferrier/49f34d6936814a457331 to your computer and use it in GitHub Desktop.
gpging the custom file
;; read the gpg agent file and set the env vars
(let ((gpg-agent-file (expand-file-name "~/.gpg-agent-info")))
(when (file-exists-p gpg-agent-file)
(message "import gpg agent file")
(mapc
(lambda (line)
(unless (equal line "")
(apply 'setenv (split-string line "="))))
(split-string
(with-temp-buffer
(insert-file-contents gpg-agent-file)
(buffer-string)) "\n"))))
;; Continue with init
(load-file
(setq custom-file
(concat
(file-name-directory
(or
(buffer-file-name)
load-file-name))
"nic-custom.el.gpg")))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment