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

[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 19:49:23 +0000 (UTC)

> >>     "^\\.#\\|^#.*#$" instead of "^\\.?#"
> >
> > I don't think so.  More like this, I think:
> 
> This will fail to match lock file names (because they don't end in "#").

Good.  (This is why doc was needed.)

> > But maybe .* is better than [^#]; dunno.

And anyway, I forgot * after [^#].

> Specifically, [^#] will fail for filenames that include "#".
> (let ((buffer-file-name "/foo/my-#tag-list"))
>   (make-auto-save-file-name)) ;=> "/foo/#my-#tag-list#"

Right  I had forgotten whether that was allowed.
Checking (elisp) `Auto-Saving'...

OK.  So maybe it should be something like this:

"\\`\\.#.*\\|\\`\\.?#.*#\\'\\|\\`\\.\\'\\|\\`\\.\\.\\'"

where:

Lock file: "\\`\\.#.*" - starts with ".#" and ends at eol.
Auto-save file: "\\`#.*#\\'" - starts and ends with "#".
Current or parent directory: "\\`\\.\\'\\|\\`\\.\\.\\" - "." or ".."





reply via email to

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