Hacker Emblem

GNU Emacs and GPGTool on Mac

BlogNotes to Myself

  • Frontpage
  • Gallery
  • About Me

GNU Emacs and GPGTool on Mac

2012-02-16

Before I switched to a Mac the real™ GNU Emacs has been my main editor. On the Mac I used Aquamacs a lot but after the recent release of Emacs for Mac OS X Version 23.4 I decided to switch back to GNU Emacs. But after the change the integration with GPGTools stopped working.

I have a couple of sensitive files that I like to keep encrypted on disk. To view or edit these files I use EasyPG with auto encryption. This allows me to find a file with the gpg extension and have Emacs load and decrypt the file at the same time. Saving the buffer automatically encrypts the file again.

After switching from Aquamacs to GNU Emacs the window for the passphrase would not show and Emacs signaled an error instead. Looking into the error it seemed that Emacs was looking for an executable gpg which it could not find.

I came closer to the solution when I realized that GPGTools was installed in /usr/local/MacGPG2 and a symbolic link /usr/local/bin/gpg was pointing to the correct executable. So Emacs obviously wasn't checking /usr/local/bin for the executable.

Emacs uses the variable exec-path when looking for executables. A quick check revealed that I was right and /usr/local/bin was indeed missing in the list. So the fix was as simple as putting the following code in my Emacs Init file:

(add-to-list 'exec-path "/usr/local/bin")

After this change everything worked as before again. Finding an encrypted file opens a new window where you have to enter the passphrase for the file. If the passphrase is correct the decrypted file appears in an Emacs buffer. Saving that buffer writes the encrypted file to disk again.

Posted by Stefan in Software Comments: (0) Trackbacks: (0)
Defined tags for this entry: Emacs, Mac
Possibly related articles
Time Machine for Lion on FreeBSD
Faster RAM failing in Mac mini
Using FreeBSD as Time Machine server
Play sound in Emacs on new mail

Trackbacks
Trackback specific URI for this entry
No Trackbacks

Comments
Display comments as (Linear | Threaded)
No comments

Add Comment

Standard emoticons like :-) and ;-) are converted to images.
Textile-formatting allowed
E-Mail addresses will not be displayed and will only be used for E-Mail notifications.
 
Submitted comments will be subject to moderation before being displayed.
 
Syndication
  • XML RSS 1.0 feed
  • XML RSS 2.0 feed
  • ATOM/XML ATOM 1.0 feed
Tags
Apache Concepts Database Mac OpenVZ Oracle PostgreSQL R SQL Tools Tuning Unix Virtualization
Recent Posts
GNU Emacs and GPGTool on Mac
Feb 16. 2012
Universal Scalability Law in Oracle
Jan 25. 2012
Logging Apache response times
Dec 6. 2011
Metric prefixes for ggplot2 scales
Oct 7. 2011
Time Machine for Lion on FreeBSD
Sep 28. 2011
License
Creative Commons License
BlogNotes to Myself by Stefan Möding is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
 
Imprint - Privacy Policy