Getting easypg working in Ubuntu


Getting easypg working in Ubuntu karmic

Published 2010-06-22

I use easypg with emacs to encrypt text files, and with the default install of emacs 23 in karmic, while I could open the encrypted files, I could not save them. Here's the error I got:

Opening output file: integer-or-marker-p nil

Here's the patch to fix the issue. Note: Looks like that link is now incorrect, so I've included the patch below.

The patch affects: /usr/share/emacs/site-lisp/easypg/epa-file.el

--- epa-file.el 2009-12-04 10:08:01.000000000 -0800
+++ /usr/share/emacs/site-lisp/easypg/epa-file.el       2010-01-28 09:11:55.000000000 -0800
@@ -237,6 +237,9 @@
               (if (stringp start)
                   (epa-file--encode-coding-string start coding-system)
+           (unless start
+           (setq start (point-min)
+           end (point-max)))
                 (epa-file--encode-coding-string (buffer-substring start end)
               (if (or epa-file-select-keys

Here's the blog entry that defines how to use easypg to encrypt your files.