aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTino Calancha2017-07-26 16:42:30 +0900
committerTino Calancha2017-07-26 16:52:00 +0900
commitd5c41e99a2071e3ee491a53a0f9506f62fa6ae54 (patch)
treecbd69979f3b940101045842dcec87e059ac6878f
parent4d30cf6be29a5a5503f8f2f2c20c7241c15be5d5 (diff)
downloademacs-d5c41e99a2071e3ee491a53a0f9506f62fa6ae54.tar.gz
emacs-d5c41e99a2071e3ee491a53a0f9506f62fa6ae54.zip
Dired: Support eshell-ls from the beginning if the user wants to
* lisp/dired.el (dired-insert-directory): Check for eshell-ls as well (Bug#27817). * test/lisp/dired-tests.el (dired-test-bug27817): Add test.
-rw-r--r--lisp/dired.el1
-rw-r--r--test/lisp/dired-tests.el13
2 files changed, 14 insertions, 0 deletions
diff --git a/lisp/dired.el b/lisp/dired.el
index 9d500a9f52d..3b29c7129d4 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -1207,6 +1207,7 @@ If HDR is non-nil, insert a header line with the directory name."
1207 ;; as indicated by `ls-lisp-use-insert-directory-program'. 1207 ;; as indicated by `ls-lisp-use-insert-directory-program'.
1208 (not (and (featurep 'ls-lisp) 1208 (not (and (featurep 'ls-lisp)
1209 (null ls-lisp-use-insert-directory-program))) 1209 (null ls-lisp-use-insert-directory-program)))
1210 (not (and (featurep 'eshell) (bound-and-true-p eshell-ls-use-in-dired)))
1210 (or (if (eq dired-use-ls-dired 'unspecified) 1211 (or (if (eq dired-use-ls-dired 'unspecified)
1211 ;; Check whether "ls --dired" gives exit code 0, and 1212 ;; Check whether "ls --dired" gives exit code 0, and
1212 ;; save the answer in `dired-use-ls-dired'. 1213 ;; save the answer in `dired-use-ls-dired'.
diff --git a/test/lisp/dired-tests.el b/test/lisp/dired-tests.el
index 69331457c0e..601d65768bd 100644
--- a/test/lisp/dired-tests.el
+++ b/test/lisp/dired-tests.el
@@ -175,5 +175,18 @@
175 (should (looking-at "src"))) 175 (should (looking-at "src")))
176 (when (buffer-live-p buf) (kill-buffer buf))))) 176 (when (buffer-live-p buf) (kill-buffer buf)))))
177 177
178(ert-deftest dired-test-bug27817 ()
179 "Test for http://debbugs.gnu.org/27817 ."
180 (require 'em-ls)
181 (let ((orig eshell-ls-use-in-dired)
182 (dired-use-ls-dired 'unspecified)
183 buf insert-directory-program)
184 (unwind-protect
185 (progn
186 (customize-set-variable 'eshell-ls-use-in-dired t)
187 (should (setq buf (dired source-directory))))
188 (customize-set-variable 'eshell-ls-use-in-dired orig)
189 (and (buffer-live-p buf) (kill-buffer)))))
190
178(provide 'dired-tests) 191(provide 'dired-tests)
179;; dired-tests.el ends here 192;; dired-tests.el ends here