[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dired uses wrong `ls' switches for Tramp
From: |
Kai Großjohann |
Subject: |
Re: dired uses wrong `ls' switches for Tramp |
Date: |
Wed, 18 Sep 2002 09:49:45 +0200 |
User-agent: |
Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3.50 (i686-pc-linux-gnu) |
Richard Stallman <address@hidden> writes:
> In dired-insert-directory, I see that "--dired" is added to the list
> of switches if the local ls groks that argument.
>
> But the remote ls might not grok it, so I'm looking for a way to
> prevent "--dired" from being added in those cases.
>
> I think it should test file-remote-p, and refrain from using
> --dired for any remote files. This is right because there is never
> any way to tell whether the remote file system supports --dired.
Tramp can just run "ls --dired" and see if ls complains. Using a
similar method, Tramp already finds out a lot of things about the
remote system.
So your suggestion is safe, though it might abstain from "--dired" to
often.
> I can imagine another, more laborious approach: to make Tramp and
> Ange-FTP notice the --dired option and "handle" it. However, they
> ucan't handle it with full correctness; the most they could do is scan
> the output to identify the file names and fake up the --dired output
> to go with them. This would produce results that are no better than
> Dired can get without the --dired option. So this approach would be
> lots of extra work and no real benefit.
Well, what is possible is to remove "--dired" from the list of args
to "ls". This is also tricky, however, as the string should not be
removed from the command "ls -- --dired", for example.
> Would you like to install the call to file-remote-p?
I'll do that.
kai
--
~/.signature is: umop 3p!sdn (Frank Nobis)