From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: Automatically encrypt on save, decrypt on open? Date: Thu, 13 Aug 2015 16:34:48 +0100 Message-ID: <87614jfbhj.fsf@ucl.ac.uk> References: <6sw6c7vbcjxnxv.fsf@dhcp-6-148.hmco.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35802) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPuWw-0002D0-UJ for emacs-orgmode@gnu.org; Thu, 13 Aug 2015 11:34:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZPuWr-0001Ex-BS for emacs-orgmode@gnu.org; Thu, 13 Aug 2015 11:34:58 -0400 Received: from mail-db3on0101.outbound.protection.outlook.com ([157.55.234.101]:43415 helo=emea01-db3-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPuWr-0001CN-38 for emacs-orgmode@gnu.org; Thu, 13 Aug 2015 11:34:53 -0400 In-Reply-To: <6sw6c7vbcjxnxv.fsf@dhcp-6-148.hmco.com> (Peter Davis's message of "Thu, 13 Aug 2015 10:28:28 -0400") 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: Peter Davis Cc: emacs-orgmode@gnu.org 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. -- : Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3.1-34-gb911f1