emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] [Patch] For the Manual: using org-crypt


From: Ian Barton
Subject: [O] [Patch] For the Manual: using org-crypt
Date: Fri, 18 Mar 2011 08:58:02 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8

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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]