From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Carsten Dominik" Subject: Re: Org-mode & EasyPG: How to enable both on a per-file-basis? Date: Sun, 8 Apr 2007 18:27:38 +0200 (CEST) Message-ID: <1397.89.50.53.70.1176049658.squirrel@webmail.science.uva.nl> References: <92571663-E4F9-4748-9299-A3E74EB61534@snapup.net> Mime-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HaaIl-0007pV-UR for emacs-orgmode@gnu.org; Sun, 08 Apr 2007 12:31:39 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HaaIj-0007o8-Ao for emacs-orgmode@gnu.org; Sun, 08 Apr 2007 12:31:38 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HaaIj-0007nm-4u for emacs-orgmode@gnu.org; Sun, 08 Apr 2007 12:31:37 -0400 Received: from smtp.science.uva.nl ([146.50.4.84]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HaaEz-0002zR-EE for emacs-orgmode@gnu.org; Sun, 08 Apr 2007 12:27:45 -0400 In-Reply-To: <92571663-E4F9-4748-9299-A3E74EB61534@snapup.net> 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: phil Cc: emacs-orgmode > Hello, > > I want to use have my .org-file gpg-encrypted. > > I played arround with EasyPG (http://www.easypg.org/) and after > compiling the package and adding: > > (require 'epa-setup) > > to my .emacs, encryption and decryption is working fine. > > When I'm saving a file EasyPG is asking for a public-key which it > should choose for encryption. To skip this dialog, there is the > possibility to put > > -*- epa-file-encrypt-to: ("EMAIL-ADRESS OR KEY-ID") -*- > > in the FIRST line. > This key is then used for encryption. > > While this is working, when in the first line, it doesn't work when I > have > > -*- mode: org; -*- > > in the line above and when I move the mode: org to the second line, > Org-Mode isn't working. > > Any ideas how I can use both settings on a per file basis: > > 1. telling Emacs that this file is a org-mode file, and > 2. telling Emacs which GPG-Key it should choose when encrypting? The best way is to read the Emacs documentation about file variables. You need to combine the two lines: -*- mode:org; epa-file-encrypt-to: ("a@b.com") -*- - Carsten