Subject: dired sort by date in ange-ftp dired buffers

From: Paul Eggert <[email-masked]>
Date: Wed, 17 Oct 2012 16:03:46 -0700

(I'm forwarding this to bug-gnu-emacs from an email sent to emacs-devel
<http://lists.gnu.org/archive/html/emacs-devel/2012-10/msg00579.html>.
As near as I can make out the problem was introduced in trunk bzr
104541, so I'll CC: this to Alexander.

2011-06-09  Alexander Klimov  <[email-masked]>  (tiny change)

	* mail/sendmail.el (mail-recover-1, mail-recover):
	* files.el (recover-file, recover-session):
	Handle dired-listing-switches not being just a single short option.

--Paul)

From: Stephen Eglen <[email-masked]>
Date: Wed, 17 Oct 2012 09:08:06 +0100

A colleague just reported this problem with Emacs 24 (and says it wasn't
there in Emacs 23.x).  I confirmed it is a problem not just for the ftp
site he was accessing but also gnu.org.  e.g.

emacs -Q /[email-masked]:/gnu

This brings up a dired buffer with the /gnu directory.  If I now hit 's'
to order by date, I then see an empty 'gnu' buffer, and the ftp buffer
*ftp ftp.gnu.org* is raised, showing:

ftp> cd /gnu/
250 Directory successfully changed.
ls -al -t /var/folders/ix/ixcktwmzGyyc6z4C5D4ypU+++TI/-Tmp-/ange-ftp39289ME2
ftp> usage: ls [remote-path [local-file]]
ftp> ls -al -t /var/folders/ix/ixcktwmzGyyc6z4C5D4ypU+++TI/-Tmp-/ange-ftp39289ME2
usage: ls [remote-path [local-file]]
ftp> 

Were the flags changed recently to do 'ls -al -t' rather than 'ls -alt'?
If I stay in the *ftp* buffer, 'ls -alt' works fine, but 'ls -al -t'
creates a file called '-t' in my local directory.

Stephen