Subject: bug#27919: 25.2.50; dired + eshell-ls: fallback to external ls fails

From: Tino Calancha <[email-masked]>
Date: Thu, 03 Aug 2017 00:59:31 +0900

X-Debbugs-CC: John Wiegley <[email-masked]>

emacs -r -Q -l em-ls -l esh-cmd -eval "(customize-set-variable 'eshell-ls-use-in-dired t)"

M-: (dired source-directory "-lg") RET
;; Signal eshell-interactive-output-p: (wrong-type-argument arrayp nil)

It fails because eshell-current-handles is nil.
Even if this variable is set, then (throw 'eshell-external ...
in `eshell--do-opts' won't be catched.

The following works:
M-x eshell RET
ls -lg (eval source-directory) RET

In GNU Emacs 25.2.50.3 (x86_64-pc-linux-gnu, GTK+ Version 3.22.11)
 of 2017-08-03 built on calancha-pc
Windowing system distributor 'The X.Org Foundation', version 11.0.11902000
System Description:	Debian GNU/Linux 9.1 (stretch)