help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Setting file extensions to be handled by gpg encryption problem


From: bar tomas
Subject: Re: Setting file extensions to be handled by gpg encryption problem
Date: Thu, 4 Nov 2010 12:24:50 +0000

Many thanks!
I defined it in custom-set-variables in the .emacs init file, as
suggested in your post and now it works directly:

(custom-set-variables
'(epa-file-name-regexp "\\.txt$"))

Thanks again.


On Thu, Nov 4, 2010 at 11:45 AM, Bruno Tavernier
<tavernier.bruno@gmail.com> wrote:
> 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
>



reply via email to

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