Subject: bug#43695: 28.0.50; FTP tramp fails with some dired listing switches

From: Michael Albinus <[email-masked]>
Date: Sat, 14 Nov 2020 10:10:31 +0100

Jean Louis <[email-masked]> writes:

> * Michael Albinus <[email-masked]> [2020-09-30 19:58]:
>> Jean Louis <[email-masked]> writes:
>> 
>> Hi Jean,
>> 
>> >> Could you pls send a backtrace when the error happens to you?
>> >
>> > How do I make backtrace? From debug?
>> 
>> Eval (setq debug-on-error t) prior your test.
>
> I understand that dired switches -al works well with FTP, but I have
> these dired switches and they do not work.

This is discussed in the Tramp manual (info "(tramp) Frequently Asked Questions")

   • Remote host does not understand default options for directory
     listing

     Emacs computes the ‘dired’ options based on the local host but if
     the remote host cannot understand the same ‘ls’ command, then set
     them with a hook as follows:

          (add-hook
           'dired-before-readin-hook
           (lambda ()
             (when (file-remote-p default-directory)
               (setq dired-actual-switches "-al"))))

Best regards, Michael.