From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastien Vauban Subject: Re: Automatically encrypt on save, decrypt on open? Date: Fri, 14 Aug 2015 14:45:27 +0200 Message-ID: <8637zmaviw.fsf@example.com> References: <6sw6c7vbcjxnxv.fsf@dhcp-6-148.hmco.com> <867foyz4ay.fsf@example.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hello John, >> > Here is the setup I have that worked when I tried it last ;) >> > >> > ;; encryption >> > (require 'epa-file) >> > (unless (memq epa-file-handler file-name-handler-alist) >> > (epa-file-enable)) >> >> Do you remember what are those 2 lines for? > > They are basically copied from thetop of > http://orgmode.org/worg/org-tutorials/encrypting-files.html > > The first line loads epa-file (epa-file.el --- the EasyPG Assistant, > transparent file encryption ) > > The second line looks like a way to call epa-file-enable if it hasn't been > enabled. You can just call epa-file-enable, and it does the check too, but > this probably avoids a minibuffer message when it is already loaded. I > think this function provides a handler for files ending in .gpg which need > to be en/decrypted by gpg. It simply because it Just Works (TM) with those 3 lines which I have in my .emacs file: --8<---------------cut here---------------start------------->8--- ;; EasyPG Assistant (with-eval-after-load "epa-file" (setq epa-file-encrypt-to "john-Ch9RrZxMC0c@public.gmane.org") (setq epa-file-cache-passphrase-for-symmetric-encryption t)) --8<---------------cut here---------------end--------------->8--- Best regards, Seb -- Sebastien Vauban