From 3e6e0d9acbb518f0d84866c6e28b27d049b6e474 Mon Sep 17 00:00:00 2001 From: Reuben Thomas Date: Tue, 8 Nov 2016 17:42:24 +0000 Subject: [PATCH] Match files case-insensitively in dired-x MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * lisp/dired-x.el (dired-mark-unmarked-files): Match the regex case-insensitively (Bug#18716). Do not use auto-mode-case-fold, as the principle is different: with find-file, it’s reasonable to treat upper-case filenames like lower-case ones, as the user will quickly see if anything is wrong, and often it’s convenient; but with dired-omit-mode, it is a bad idea to hide files that the user might expect to see, as the omission will, by the nature of omission, not be obvious! --- lisp/dired-x.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/dired-x.el b/lisp/dired-x.el index 8313905..a5d1e49 100644 --- a/lisp/dired-x.el +++ b/lisp/dired-x.el @@ -594,7 +594,8 @@ dired-mark-unmarked-files ;; not already marked (looking-at-p " ") ;; uninteresting - (let ((fn (dired-get-filename localp t))) + (let ((fn (dired-get-filename localp t)) + (case-fold-search nil)) (and fn (string-match-p regexp fn)))) msg))) -- 2.7.4