[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[h-e-w] suggestion: ignore case in find-name-dired, on Windows

From: Eric Hanchrow
Subject: [h-e-w] suggestion: ignore case in find-name-dired, on Windows
Date: Thu, 20 Dec 2007 17:10:03 -0800

I've found that this little hack makes my life better on Windows
(using the Cygwin "find"), since the file system is case-insensitive,
and I never remember the precise spelling of a file's name.
Unfortunately, this hack isn't a complete solution for all similar
problems, since there are a number of places in the code that
hard-code the "-name" argument.  But this works for me.

--- find-dired.el       25 Jul 2007 22:26:23 -0700      1.57
+++ find-dired.el       20 Dec 2007 17:08:13 -0800
@@ -198,7 +198,11 @@
     find . -name 'PATTERN' -ls"
    "DFind-name (directory): \nsFind-name (filename wildcard): ")
-  (find-dired dir (concat "-name " (shell-quote-argument pattern))))
+  (find-dired dir (concat
+                   (if (memq system-type '(windows-nt cygwin))
+                       "-iname "
+                     "-name ")
+                   (shell-quote-argument pattern))))

 ;; This functionality suggested by
 ;; From: address@hidden (Olivier Blanc)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]