GNU bug report logs -
#27843
26.0.50; Dired w/ eshell insert subdirs content when dir-or-list is a cons
Previous Next
Reported by: Tino Calancha <tino.calancha <at> gmail.com>
Date: Thu, 27 Jul 2017 03:20:01 UTC
Severity: minor
Found in version 26.0.50
Done: Tino Calancha <tino.calancha <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Tino Calancha <tino.calancha <at> gmail.com> writes:
> @@ -276,8 +276,10 @@ eshell-ls--insert-directory
> (let ((insert-func 'insert)
> (error-func 'insert)
> (flush-func 'ignore)
> - eshell-ls-dired-initial-args)
> - (eshell-do-ls (append switches (list file)))))))))
> + (switches (append eshell-ls-dired-initial-args
> + (and (consp dired-directory) (list "-d"))
> + switches)))
> + (eshell-do-ls (nconc switches (list file)))))))))
Not just when dired-directory is a cons, _also_ if WILDCARD is non-nil
we must just list the directory entry.
--8<-----------------------------cut here---------------start------------->8---
commit 2fd058081bac06744ee38acdd209a3fce4405131
Author: Tino Calancha <tino.calancha <at> gmail.com>
Date: Thu Jul 27 18:12:46 2017 +0900
Dired w/ eshell: Don't insert subdirs content if dir-or-list is a cons
* lisp/eshell/em-ls.el (eshell-ls--insert-directory):
Append '("-d") into 'eshell-ls-dired-initial-args'
when 'dired-directory' is a cons (Bug#27843).
* test/lisp/dired-tests.el (dired-test-bug27843): Add test.
diff --git a/lisp/eshell/em-ls.el b/lisp/eshell/em-ls.el
index 79799db30b..5926969b09 100644
--- a/lisp/eshell/em-ls.el
+++ b/lisp/eshell/em-ls.el
@@ -276,8 +276,10 @@ eshell-ls--insert-directory
(let ((insert-func 'insert)
(error-func 'insert)
(flush-func 'ignore)
- eshell-ls-dired-initial-args)
- (eshell-do-ls (append switches (list file)))))))))
+ (switches (append eshell-ls-dired-initial-args
+ (and (or (consp dired-directory) wildcard) (list "-d"))
+ switches)))
+ (eshell-do-ls (nconc switches (list file)))))))))
(defsubst eshell/ls (&rest args)
"An alias version of `eshell-do-ls'."
--8<-----------------------------cut here---------------end--------------->8---
In GNU Emacs 26.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.11)
of 2017-07-26
Repository revision: 28faa94f1c423091bb34c2776eabe9ae83e5b4fc
This bug report was last modified 7 years and 300 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.