From: Thierry Volpiatto <thierry.volpiatto@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Setting file extensions to be handled by gpg encryption problem
Date: Sat, 06 Nov 2010 19:03:56 +0100 [thread overview]
Message-ID: <87k4kqpbw3.fsf@tux.homenetwork> (raw)
In-Reply-To: AANLkTi=Pwb7sY0fyfkkVkLyLLYXM_WjbQBA8XisbL5sd@mail.gmail.com
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
next prev parent reply other threads:[~2010-11-06 18:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-04 10:36 Setting file extensions to be handled by gpg encryption problem bar tomas
2010-11-04 11:45 ` Bruno Tavernier
2010-11-04 12:24 ` bar tomas
2010-11-04 15:39 ` bar tomas
2010-11-05 5:01 ` PJ Weisberg
2010-11-06 14:15 ` bar tomas
2010-11-06 17:20 ` Suvayu Ali
2010-11-06 18:03 ` Thierry Volpiatto [this message]
2010-11-06 21:11 ` Steve Revilak
2010-11-08 9:40 ` bar tomas
[not found] ` <mailman.2.1288886101.27623.help-gnu-emacs@gnu.org>
2010-11-04 19:42 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k4kqpbw3.fsf@tux.homenetwork \
--to=thierry.volpiatto@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.