From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Barton Subject: [Patch] For the Manual: using org-crypt Date: Fri, 18 Mar 2011 08:58:02 +0000 Message-ID: <4D831E9A.9050808@manor-farm.org> Reply-To: lists@manor-farm.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=50332 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q0VVW-0005pu-Vf for emacs-orgmode@gnu.org; Fri, 18 Mar 2011 04:58:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q0VVV-0007Q1-Io for emacs-orgmode@gnu.org; Fri, 18 Mar 2011 04:58:06 -0400 Received: from mail.ian-barton.com ([109.74.196.44]:44999 helo=li40-130.members.linode.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q0VVV-0007Pw-Bk for emacs-orgmode@gnu.org; Fri, 18 Mar 2011 04:58:05 -0400 Received: from localhost (mail.wilkesley.org [127.0.0.1]) by li40-130.members.linode.com (Postfix) with ESMTP id E8C6FA084 for ; Fri, 18 Mar 2011 08:58:03 +0000 (UTC) Received: from li40-130.members.linode.com ([127.0.0.1]) by localhost (mail.manor-farm.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Mfphcv71aR9O for ; Fri, 18 Mar 2011 08:58:03 +0000 (UTC) Received: from mail.wilkesley.net (unknown [217.146.125.41]) by li40-130.members.linode.com (Postfix) with ESMTP id B2101A063 for ; Fri, 18 Mar 2011 08:58:03 +0000 (UTC) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.wilkesley.net (Postfix) with ESMTP id 5E8EB11E70 for ; Fri, 18 Mar 2011 09:02:49 +0000 (GMT) Received: from mail.wilkesley.net ([127.0.0.1]) by localhost (mail.bantercat.co.uk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aqESjvChfIjW for ; Fri, 18 Mar 2011 09:02:49 +0000 (GMT) Received: from [192.168.0.133] (scamper.bantercat.co.uk [192.168.0.133]) by mail.wilkesley.net (Postfix) with ESMTPSA id 255C911E08 for ; Fri, 18 Mar 2011 09:02:49 +0000 (GMT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Apologies in advance this isn't a "real" patch:) This is the entry for the manual describing org-crypt.el. I was going to put it in http://orgmode.org/manual/Miscellaneous.html#Miscellaneous However, since I am not a Tex user, I rapidly came to the conclusion that if I tried to patch org.texi, I would probably do more harm than good. I have also pushed a short Tutorial to Worg about using encryption with org files. Ian. * org-crypt.el org-crypt will encrypt the text of an entry, but not the headline, or properties. Org-crypt uses the Emacs EasyPG library to ecnrypt and decrypt files. EasyPG is part of recent Emacs releases (at least Emacs 23). It is available as a separate package for earlier versions of Emacs. If your version of Emacs already has EasyPG do not install the package manager's version. Doing so will lead to unpredictable results. To use org-crypt you will need to have something like the following in your .emacs: #+BEGIN_SRC emacs-lisp (require 'org-crypt) (org-crypt-use-before-save-magic) (setq org-tags-exclude-from-inheritance (quote ("crypt"))) ;; GPG key to use for encryption ;; Either the Key ID or set to nil to use symmetric encryption. (setq org-crypt-key nil) #+END_SRC If you want to use Public Key Encryption, you will need to generate a suitable pubic/private key pair using gnupg. Now any text below a headline that has a :crypt: tag will be automatically be encrypted when the file is saved. If you want to use a different tag just customize the "org-crypt-tag-matcher" setting. Preventing tag inheritance stops you having encrypted text inside encrypted text. To decrypt the text just call "M-x org-decrypt-entry" and the encrypted text where the point is will be replaced with the plain text. If you use this feature a lot, you will probably want to bind "M-x org-decrypt-entry" to a key.