Subject: Re: bug#78800: 30.1; dired-re-perms is valid only with modes in ls-lisp-verbosity

From: Eli Zaretskii <[email-masked]>
Date: Mon, 16 Jun 2025 12:36:39 +0300

> From: Johan Claesson <[email-masked]>
> Date: Sun, 15 Jun 2025 15:34:28 +0200
> 
> I am writing about a very small corner case problem in dired in Emacs.
> Since 83e0442 when modes is not a member of ls-lisp-verbosity then
> ls-lisp will print the permissions in short form like "drwx".  This will
> not match the dired-re-perms regexp which expect like "drwxrwxrwx". This
> will cause a problem in dired for filenames that ends with a colon (:).
> To reproduce from emacs -Q:
> 
> (require 'ls-lisp)
> (setq ls-lisp-use-insert-directory-program nil
>       ls-lisp-verbosity '(links uid))
> 
> And then visit a directory containing a file ending with a colon.  
> Maybe the dired-re-perms could just be shortened/simplified to cover
> this case as well?

It is not easy to modify the value of dired-re-perms, because it is
also used in dired-font-lock-keywords, whose value is set when
dired.el is first loaded.

I must say that the feature introduced by 83e0442 is problematic, when
used on Posix systems that could have files with names ending in a
colon.  For that reason, I don't recommend using it on Posix systems.
Why are you using it?

Adding Sam to the discussion, who added that feature, in case he could
have comments or suggestions.