From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Davis Subject: Re: Automatically encrypt on save, decrypt on open? Date: Thu, 13 Aug 2015 11:47:51 -0400 Message-ID: <6sw6c7h9o3xk9k.fsf@dhcp-6-148.hmco.com> References: <6sw6c7vbcjxnxv.fsf@dhcp-6-148.hmco.com> <87614jfbhj.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39109) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPujZ-0007r8-BZ for emacs-orgmode@gnu.org; Thu, 13 Aug 2015 11:48:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZPujT-0007od-HA for emacs-orgmode@gnu.org; Thu, 13 Aug 2015 11:48:01 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:60494) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPujT-0007nr-Dd for emacs-orgmode@gnu.org; Thu, 13 Aug 2015 11:47:55 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 55AD220B5C for ; Thu, 13 Aug 2015 11:47:53 -0400 (EDT) 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@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Thanks! This might be the best solution, since it's really just one file I want to encrypt/decrypt. -pd Eric S Fraga writes: > On Thursday, 13 Aug 2015 at 10:28, Peter Davis wrote: >> I'd like to store information in an org page that gets automatically >> encrypted when I save it, and decrypted when I open it. Is >> there some built-in functionality or hooks for this? > > An alternative to using org's own encryption facility, as others have > suggested, is to encrypt the file as a whole and let emacs worry about > it. > > If you create an encrypted file (say using gnupg on the command line) > with the following first line: > > # -*- mode: org; epa-file-encrypt-to: ("your key name/email"); version-control: nil; -*- > > then opening the file will start it up in org mode and will encrypt on > saving. > > I prefer this in some cases although I do also use org's capabilities > for some sections in a file.