Subject: bug#76920: dired with unexpected character in filename: cannot delete file

From: Eli Zaretskii <[email-masked]>
Date: Mon, 10 Mar 2025 19:24:30 +0200

> From: "Windl, Ulrich" <[email-masked]>
> Date: Mon, 10 Mar 2025 13:44:41 +0000
> 
> I’ve managed to create a bad filename using some script. The file name is “iredir-<<<<<<<
> HEAD?0.5.2n.tar.gz” (without the double quites and the ‘?’ is actually an ASCI LF (line break)).
> 
>  
> 
> When trying to delete the bad file using ‘d’ and ‘x’ in dired of Emacs 27.2, it fails like this:
> 
> It asks:
> 
> Delete iredir-<<<<<<< HEAD
> 
> 0.5.2n.tar.gz
> 
>   -rw-r--r-- (yes or no)
> 
> And when entering “yes” it replies with “Deleting…done”, but the file is still there

This is a known issue.  To work around it, add -b to
dired-listing-switches.  (We cannot do that by default, because it has
problems in other cases.)