Subject: Re: bug#4044: 23.1; unable to handle folder whose name starts with 2009-08-04

From: Michael Albinus <[email-masked]>
Date: Mon, 10 Aug 2009 10:34:19 +0200

Chong Yidong <[email-masked]> writes:

>> if a folder has names like “2009-08-04 misc”, then emacs dired  
>> will mistake the folder name being just “misc”, and basically  
>> unable to open, move, delete the folder.
>>
>> • switch to dired.
>> • type + then 2009-08-04 misc
>>
>> • Now, you can see the coloring is wrong. Try to move, rename, or go  
>> into the folder. Emacs complains
>> dired-get-file-for-visit: File no longer exists; type `g' to update  
>> dired buffer
>>
>> This happens on emacs 23.x on Mac. 100% reproducible.
>
> I'm afraid I can't reproduce it on GNU/Linux with 23.1, or with trunk.
> Do you see the problem without customizations (-Q)?

This is similar to Bug#4075. The problem is, that the `dired-filename'
text property is wrongly set in the dired buffer for that entry.

Under GNU/Linux, this property is set correctly, likely due to the
"--dired" switch of the ls command (see `insert-directory'). Tramp
hasn't set it until recently, and somebody else did set the wrong value
when Tramp's `tramp-handle-insert-directory' was finished.

I have solved it (partly) by setting this text property in
`tramp-handle-insert-directory', if possible. I have no idea what
happens on Mac.

Best regards, Michael.