From: Eli Zaretskii Date: Fri, 5 Jul 2024 10:58:11 +0000 (+0300) Subject: Fix file-name detection in Dired under -F X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=67899d0c277605b3346d1175875c6ac58cd6aa82;p=emacs.git Fix file-name detection in Dired under -F * lisp/files.el (insert-directory-clean): Support all the symbols appended to file names by the -F/--classify option of 'ls'. See https://lists.gnu.org/archive/html/emacs-devel/2024-07/msg00366.html for the details. (cherry picked from commit d190cb0e886f3d748ddbb8bf915c19149d00c0c4) --- diff --git a/lisp/files.el b/lisp/files.el index 79bc5c1c083..74a9c62c667 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -8134,8 +8134,8 @@ Valid wildcards are `*', `?', `[abc]' and `[a-z]'." (end (insert-directory-adj-pos (+ beg (read (current-buffer))) error-lines))) - (if (memq (char-after end) '(?\n ?\s)) - ;; End is followed by \n or by " -> ". + (if (memq (char-after end) '(?\n ?\s ?/ ?* ?@ ?% ?= ?|)) + ;; End is followed by \n or by output of -F. (put-text-property start end 'dired-filename t) ;; It seems that we can't trust ls's output as to ;; byte positions of filenames.