Emacs, gpg and pinentry on Mac

I use Emacs and GnuPG to save my passwords to an encrypted file. I'm really happy with this, as I save the encrypted file in Dropbox, and I can decrypt it across all machines and Operating Systems, and it syncs automatically. My Emacs config looks as follows:
(setenv "GPG_AGENT_INFO" nil)
(require 'password-cache)
(require 'epa-file)
(epa-file-enable)
(setq password-cache-expiry (* 15 60))
(setq epa-file-cache-passphrase-for-symmetric-encryption t)

Continue reading “Emacs, gpg and pinentry on Mac”

Automating my life

Lately I've been doing a lot of work on automating my life. It's been a lot of fun! I've been using Python and Jupyter a lot to create scripts to make myself more productive. I have been customising my notebook to create an optimal work environment. I've been setting up my Emacs environment to make it more effective. It's been nice having the space to do this!

Emacs and Jupyter

Today I discovered the sheer awesomeness that is Emacs with EIN. This lets my Emacs environment to to Jupyter Notebooks. Through it, I have the power of Emacs Python completion and editing while writing iPython functions. It works really well! I can display matplotlib graphs inline in my Emacs buffer. There is even symbolic computation via the sympy package! Bliss!

Emacs cmd-key on Mac

Emacs on my Macbook Pro uses the "alt" key (the one to the left of the "cmd" key) to be the Alt (meta) key when doing things like Alt-Backspace to delete backwards by word. This is quite annoying for me as I naturally try and use the command key for this. To fix this put the following in your .emacs file.

(setq mac-command-modifier 'meta)