[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#34911: 26.1; doc about lock file names
From: |
Drew Adams |
Subject: |
bug#34911: 26.1; doc about lock file names |
Date: |
Sun, 19 May 2019 16:29:37 +0000 (UTC) |
> >> >> The default value is "^\\.?#\\|^\\.$\\|^\\.\\.$".
> >> >>
> >> >> \\.?# matches only the first char of an auto-save file
> >> >> name, and the first two chars of a lock file name. It
> >> >> does not match the full name, requiring it to end with
> >> >> `#'. That means that (1) it cannot be used as is for,
> >> >> say, font-locking such a (complete) name, and (2) as
> >> >> it is now, it can falsely identify files that are not
> >> >> auto-save or lock files.
> >> >
> >> > It's a regexp, so of course you can name files which aren't auto-save or
> >> > lock files in such a way that they match it.
> >>
> >> After looking at it some more, I realize you were probably suggesting
> >> that the regexp should have something like "^.#\\|^#.*#$" instead of
> >> "^\\.?#"
> >
> > No, I don't think so. It is correct, I think, to
> > say that the beginning matches .# (or the whole
> > thing matches . or ..) - that is, the dot is literal.
>
> Sorry, forgot to escape the dot, I meant
>
> "^\\.#\\|^#.*#$" instead of "^\\.?#"
I don't think so. More like this, I think:
"^\\.?#[^#]#$\\|^\\.$\\|^\\.\\.$" or preferably this:
"\\`\\.?#[^#]#\\'\\|\\`\\.\\'\\|\\`\\.\\.\\'"
But maybe .* is better than [^#]; dunno.
I don't have time to check right now, but I think
the names to match, besides . and .., start with
.# or # and end with #. The idea is to match the
start and end, and whatever is between the two.