From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bruno Tavernier Newsgroups: gmane.emacs.help Subject: Re: Setting file extensions to be handled by gpg encryption problem Date: Thu, 04 Nov 2010 20:45:24 +0900 Message-ID: <8739rh48iz.fsf@gmail.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1288871118 31758 80.91.229.12 (4 Nov 2010 11:45:18 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 4 Nov 2010 11:45:18 +0000 (UTC) Cc: emacs-help To: bar tomas Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Nov 04 12:45:14 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PDyFl-0004Xe-M4 for geh-help-gnu-emacs@m.gmane.org; Thu, 04 Nov 2010 12:45:13 +0100 Original-Received: from localhost ([127.0.0.1]:40176 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PDyFl-0002Ia-90 for geh-help-gnu-emacs@m.gmane.org; Thu, 04 Nov 2010 07:45:13 -0400 Original-Received: from [140.186.70.92] (port=60616 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PDyFN-0002IS-68 for help-gnu-emacs@gnu.org; Thu, 04 Nov 2010 07:44:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PDyFM-0006gN-3K for help-gnu-emacs@gnu.org; Thu, 04 Nov 2010 07:44:49 -0400 Original-Received: from mail-pw0-f41.google.com ([209.85.160.41]:42970) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PDyFL-0006gF-V6 for help-gnu-emacs@gnu.org; Thu, 04 Nov 2010 07:44:48 -0400 Original-Received: by pwi1 with SMTP id 1so741582pwi.0 for ; Thu, 04 Nov 2010 04:44:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:references :date:in-reply-to:message-id:user-agent:mime-version:content-type; bh=u3DDESHHeNkfOe0xJsa80uG/2iOHy/W+C8YPlPUBlTc=; b=wl+v1sc6/db3BoD34PDuRp9ihAaMtSDt9NSwrANygPlGFwQTuHQGCpPJGpcWz6Z8Pt 75Bm+tkutF+IZfMKPV/N4fqaINY+YX74XwnHa8fipKATv435gKBEt7DjSbG+QMcuZpxh 8hNNW8s3BRs7lF7JQ9t2ldAa9PTew66f8SC2o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; b=NELpFx0kxt2ZkMX8NB6oHv63erFKaGd+KK/NMPTzdIrD6ZLi1Od/gpENatd+0eEhFy fM/zjBlge/NDYG0nSl1aACdLFtGaGYlXhNa/KtcZxTwXazm7LSKMRzcBVPYW4+QLdH5p zZ9McIFzaTtpsuXoLvC0IR8FKExwG8YCeErNI= Original-Received: by 10.142.113.9 with SMTP id l9mr465287wfc.167.1288871086817; Thu, 04 Nov 2010 04:44:46 -0700 (PDT) Original-Received: from TdM (softbank219185161154.bbtec.net [219.185.161.154]) by mx.google.com with ESMTPS id p8sm15309647wff.4.2010.11.04.04.44.44 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 04 Nov 2010 04:44:45 -0700 (PDT) In-Reply-To: (bar tomas's message of "Thu, 4 Nov 2010 10:36:57 +0000") User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:75288 Archived-At: Hi Tomas, > I'm using gpg to encrypt files and I would like that files with 'txt' > extension be treated like 'gpg' files. > I read in the doc that this can be controlled with the variable > epa-file-name-regexp > So I added the following line at the end of my .emacs file > > (setq epa-file-name-regexp "\\.txt$") > > But this has absolutely no effect. I mean, if I create a txt file with > emacs, when I save it I would like for emacs to ask for an encryption > paraphrase, but it does not. I just tried, it indeed does not work with that line only. You have then to call `epa-file-name-regexp-update' to make it works. cf describe-variable epa-file-name-regexp ,---- | epa-file-name-regexp is a variable defined in `epa-hook.el'. | Its value is | "\\.gpg\\(~\\|\\.~[0-9]+~\\)?\\'" | | Documentation: | Regexp which matches filenames to be encrypted with GnuPG. | | If you set this outside Custom while epa-file is already enabled, you | have to call `epa-file-name-regexp-update' after setting it to | properly update file-name-handler-alist. Setting this through Custom | does that automatically. `---- -- Bruno