From: Tino Calancha <tino.calancha@gmail.com>
To: 27843@debbugs.gnu.org
Subject: bug#27843: 26.0.50; Dired w/ eshell insert subdirs content when dir-or-list is a cons
Date: Thu, 27 Jul 2017 18:26:53 +0900 [thread overview]
Message-ID: <87eft2ut5u.fsf@calancha-pc> (raw)
In-Reply-To: <87bmo6sh1v.fsf@calancha-pc> (Tino Calancha's message of "Thu, 27 Jul 2017 12:19:08 +0900")
Tino Calancha <tino.calancha@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@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
next prev parent reply other threads:[~2017-07-27 9:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-27 3:19 bug#27843: 26.0.50; Dired w/ eshell insert subdirs content when dir-or-list is a cons Tino Calancha
2017-07-27 9:26 ` Tino Calancha [this message]
2017-07-29 9:07 ` Eli Zaretskii
2017-07-29 9:04 ` Eli Zaretskii
2017-08-01 14:34 ` Tino Calancha
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87eft2ut5u.fsf@calancha-pc \
--to=tino.calancha@gmail.com \
--cc=27843@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.