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

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

bug#8159: file-name-sans-version fails for some git files


From: Reuben Thomas
Subject: bug#8159: file-name-sans-version fails for some git files
Date: Thu, 3 Mar 2011 15:26:05 +0000

On 3 March 2011 15:09, Andreas Schwab <schwab@linux-m68k.org> wrote:
> Eli Zaretskii <eliz@gnu.org> writes:
>
>> Anyway, your change is not limited to this particular situation, it is
>> more general.  It will affect any file of that form, anywhere.
>
> file-name-version-regexp is already very general.  But one problem is
> that by adding ~ it would match backups of backups.

To be precise, it would match non-numbered backups of non-numbered
backups of non-numbered backups, and non-numbered backups of numbered
backups: the current pattern requires either a single ~, or two tildes
with at least one other character between them.

To fix this would require specifying that an internal tilde is
preceded and followed by at least one character from the rest of the
character class [-[:alnum:]:#@^._] (or, if you just want to cope with
git notation, then preceded by one such character, and followed by a
digit), i.e. something like

\\(?:~\\|\\.~[-[:alnum:]:#@^._]+\\([-[:alnum:]:#@^._~]*[-[:alnum:]:#@^._]+\\)?~\\)

-- 
http://rrt.sc3d.org





reply via email to

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