Subject: bug#70415: 30.0.50; [Cygwin] `lock-file' creates a symlink with funny name

From: Ken Brown <[email-masked]>
Date: Tue, 16 Apr 2024 18:57:21 -0400

On 4/16/2024 9:32 AM, Eli Zaretskii wrote:
>> Date: Tue, 16 Apr 2024 21:33:07 +0900
>> From: Katsumi Yamaoka <[email-masked]>
>>
>> As you know, Emacs creates a lock file when start editing a FILE
>> by default, it is a symbolic link that is linked to a name
>> looking like this:
>>
>> .#FILE -> [email-masked]
>>
>> Where 1234 is Emacs' pid.  It will be removed after saving
>> the FILE.  Even if the lock file is left, Emacs will remove it
>> when opening the FILE for the next time.  However, recently lock
>> files no longer got deleted on at least the latest Cygwin on
>> Windows 11.  It is (probably) because Emacs came to create lock
>> files with a funny name like this:
>>
>> .#FILE -> [email-masked]:-11644473599
>>
>> For that case `(unlock-file "FILE")' issues this warning:
>>
>> Warning (unlock-file): Unlocking file: Invalid argument, FILE, ignored
> 
> Does Cygwin support file names with a colon, such as the above?

I'm traveling at the moment, and it will be a while until I have a 
chance to look at this report closely or try to reproduce it.  But I can 
answer your question: Cygwin does support file names with a colon.  This 
is documented at

   https://cygwin.com/cygwin-ug-net/using-specialnames.html

Ken