[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 15:39:00 +0000 |
Hi,
I just realized that the problem of writing
> (custom-set-variables
> '(epa-file-name-regexp "\\.txt$"))
as I put in my previous post to force emacs to treat txt files with
gpg encryption is that files of extension gpg then do not trigger the
gpg mode.
I tried wrting a regular expression that would include both txt and
gpg extension files like this:
(custom-set-variables
'(epa-file-name-regexp "\(\\.txt$\)\|\(\\.gpg$\)")
)
But there must be an error in my regular expression, because it doesn't work.
Many thanks for any help pointing out my error
On Thu, Nov 4, 2010 at 12:24 PM, bar tomas <bartomas@gmail.com> wrote:
> 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
>>
>
- Setting file extensions to be handled by gpg encryption problem, bar tomas, 2010/11/04
- Re: Setting file extensions to be handled by gpg encryption problem, Bruno Tavernier, 2010/11/04
- Re: Setting file extensions to be handled by gpg encryption problem, bar tomas, 2010/11/04
- Re: Setting file extensions to be handled by gpg encryption problem,
bar tomas <=
- Re: Setting file extensions to be handled by gpg encryption problem, PJ Weisberg, 2010/11/05
- Re: Setting file extensions to be handled by gpg encryption problem, bar tomas, 2010/11/06
- Re: Setting file extensions to be handled by gpg encryption problem, Suvayu Ali, 2010/11/06
- Re: Setting file extensions to be handled by gpg encryption problem, Thierry Volpiatto, 2010/11/06
- Re: Setting file extensions to be handled by gpg encryption problem, Steve Revilak, 2010/11/06
- Re: Setting file extensions to be handled by gpg encryption problem, bar tomas, 2010/11/08