diff options
author | Tino Calancha <tino.calancha@gmail.com> | 2017-07-26 16:42:30 +0900 |
---|---|---|
committer | Tino Calancha <tino.calancha@gmail.com> | 2017-07-26 16:52:00 +0900 |
commit | d5c41e99a2071e3ee491a53a0f9506f62fa6ae54 (patch) | |
tree | cbd69979f3b940101045842dcec87e059ac6878f | |
parent | 4d30cf6be29a5a5503f8f2f2c20c7241c15be5d5 (diff) | |
download | emacs-d5c41e99a2071e3ee491a53a0f9506f62fa6ae54.tar.gz |
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.el | 1 | ||||
-rw-r--r-- | test/lisp/dired-tests.el | 13 |
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." ;; as indicated by `ls-lisp-use-insert-directory-program'. (not (and (featurep 'ls-lisp) (null ls-lisp-use-insert-directory-program))) + (not (and (featurep 'eshell) (bound-and-true-p eshell-ls-use-in-dired))) (or (if (eq dired-use-ls-dired 'unspecified) ;; Check whether "ls --dired" gives exit code 0, and ;; 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 @@ (should (looking-at "src"))) (when (buffer-live-p buf) (kill-buffer buf))))) +(ert-deftest dired-test-bug27817 () + "Test for http://debbugs.gnu.org/27817 ." + (require 'em-ls) + (let ((orig eshell-ls-use-in-dired) + (dired-use-ls-dired 'unspecified) + buf insert-directory-program) + (unwind-protect + (progn + (customize-set-variable 'eshell-ls-use-in-dired t) + (should (setq buf (dired source-directory)))) + (customize-set-variable 'eshell-ls-use-in-dired orig) + (and (buffer-live-p buf) (kill-buffer))))) + (provide 'dired-tests) ;; dired-tests.el ends here |