Subject: Patch for this bug

From: Reuben Thomas <[email-masked]>
Date: Tue, 8 Nov 2016 17:51:26 +0000

I attach a patch for this bug.

It makes dired-mark-unmarked-files act case-insensitively. This seems
reasonable, as there's nothing to suggest it does otherwise.

Also, it is better than Stefan's suggestion to use auto-mode-case-fold, as
when visiting files, the user will quickly see if a file has been e.g.
visited in the wrong major mode owing to an uppercase filename being
treated as a lowercase one; whereas in dired-omit-mode, files can be hidden
counter to the user's expectation, as happened to me with COPYING.LIB, yet
it is not obvious (because the file is hidden!).

Is this OK to install?

-- 
http://rrt.sc3d.org
From 3e6e0d9acbb518f0d84866c6e28b27d049b6e474 Mon Sep 17 00:00:00 2001
From: Reuben Thomas <[email-masked]>
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