Don't override find-ls-option in case of Windows and when cmdproxy used.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Tue, 06 Apr 2010 22:50:47 +0300
changeset 382 bebb0803780f
parent 381 817a4316df77
child 383 05d5f28e9ff5
Don't override find-ls-option in case of Windows and when cmdproxy used.
.emacs-my
--- a/.emacs-my	Sat Apr 03 21:24:33 2010 +0400
+++ b/.emacs-my	Tue Apr 06 22:50:47 2010 +0300
@@ -256,7 +256,7 @@
 (setq grep-highlight-matches nil)
 (setq grep-use-null-device nil)
 ;; For find-dired.
-(setq find-ls-option '("-exec ls -ld {} \\;" . "-ld"))
+;; (setq find-ls-option '("-exec ls -ld {} \\;" . "-ld"))
 
 (global-set-key [M-f7] 'rgrep)
 
@@ -636,20 +636,20 @@
 
 (when (eq window-system 'w32)           ; may require Cygwin or MSYS
   (setenv "ESHELL" "bash")
-  (if my-use-windows-shell
-      ;; Restore shell name if user set SHELL env var for Cygwin/MSYS.
-      (setq shell-file-name (concat exec-directory "cmdproxy.exe"))
+  (when my-use-windows-shell
+    ;; Restore shell name if user set SHELL env var for Cygwin/MSYS.
+    (setq shell-file-name (concat exec-directory "cmdproxy.exe"))
     ;; Use shell from Cygwin/MinGW.
     (setq shell-file-name "sh")
+    ;; Here is workaround: when explicit-shell-file-name is "bash" and shell-file-name is "cmdproxy.exe"
+    ;; find-dired incorrect quote args (in shell-quote-argument (w32-shell-name) return "bash", but
+    ;; shell-command used shell-file-name which value "cmdproxy.exe"). So I put additional space in pattern to
+    ;; prevent quoting.
+    (setq find-ls-option '("-exec ls -ld {}  ;" . "-ld"))
     )
   ;; (setq explicit-shell-file-name "bash")
   (setq explicit-bash-args '("-i"))
   (setq explicit-sh-args '("-i"))
-  ;; Here is workaround: when explicit-shell-file-name is "bash" and shell-file-name is "cmdproxy.exe"
-  ;; find-dired incorrect quote args (in shell-quote-argument (w32-shell-name) return "bash", but
-  ;; shell-command used shell-file-name which value "cmdproxy.exe"). So I put additional space in pattern to
-  ;; prevent quoting.
-  (setq find-ls-option '("-exec ls -ld {}  ;" . "-ld"))
   )
 
 ;; ======================================================================