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: Thierry Volpiatto
Subject: Re: Setting file extensions to be handled by gpg encryption problem
Date: Sat, 06 Nov 2010 19:03:56 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

bar tomas <bartomas@gmail.com> writes:

> Many thanks for your help, but the regular expression you suggest
> doesn't seem to capture file names with extension txt or gpg.
> I've tried to test it in an emacs buffer and tried both
> (\\.txt$)|(\\.gpg$) and (\.txt$)|(\.gpg$) but it doesn't seem to work
> either.
> Many thanks for any help
Here is the default regexp:

"\\.gpg\\(~\\|\\.~[0-9]+~\\)?\\'"

Here what you could use:

"\\.gpg\\|\\.txt\\(~\\|\\.~[0-9]+~\\)?\\'"

You don't need two groups.

The second part of the regexp is needed if you want that backup files
of your encrypted files be encrypted (e.g toto.gpg ==> toto.gpg~4~)

> Tomas Bar
>
> On Fri, Nov 5, 2010 at 5:01 AM, PJ Weisberg <pj@irregularexpressions.net> 
> wrote:
>> On Thu, Nov 4, 2010 at 3:39 PM, bar tomas <bartomas@gmail.com> wrote:
>>> 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
>>
>> I haven't actually tried it, but it looks like you mean "(\\.txt$)|(\\.gpg$)"
>>
>
>

-- 
A+ Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 




reply via email to

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