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

From: Jean Louis <[email-masked]>
Date: Wed, 28 Oct 2020 14:49:45 +0300

* 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 Emacs is from 24th October.

Debugger entered--Lisp error: (ftp-error "FTP Error: DIR failed: usage: ls remote-directory ...")
  signal(ftp-error ("FTP Error: DIR failed: usage: ls remote-directory ..."))
  tramp-signal-hook-function(ftp-error ("FTP Error: DIR failed: usage: ls remote-directory ..."))
  signal(ftp-error ("FTP Error: DIR failed: usage: ls remote-directory ..."))
  ange-ftp-hook-function(insert-directory "/ftp:[email-masked]:/" "--dired -gohl --group-directories-first" nil t)
  apply(ange-ftp-hook-function insert-directory ("/ftp:[email-masked]:/" "--dired -gohl --group-directories-first" nil t))
  tramp-ftp-file-name-handler(insert-directory "/ftp:[email-masked]:/" "--dired -gohl --group-directories-first" nil t)
  apply(tramp-ftp-file-name-handler insert-directory ("/ftp:[email-masked]:/" "--dired -gohl --group-directories-first" nil t))
  tramp-file-name-handler(insert-directory "/ftp:[email-masked]:/" "--dired -gohl --group-directories-first" nil t)
  #f(compiled-function (file switches &optional wildcard full-directory-p) "Insert directory listing for FILE, formatted according to SWITCHES.\nLeaves point after the inserted text.\nSWITCHES may be a string of options, or a list of strings\nrepresenting individual options.\nOptional third arg WILDCARD means treat FILE as shell wildcard.\nOptional fourth arg FULL-DIRECTORY-P means file is a directory and\nswitches do not contain `d', so that a full listing is expected.\n\nThis works by running a directory listing program\nwhose name is in the variable `insert-directory-program'.\nIf WILDCARD, it also runs the shell specified by `shell-file-name'.\n\nWhen SWITCHES contains the long `--dired' option, this function\ntreats it specially, for the sake of dired.  However, the\nnormally equivalent short `-D' option is just passed on to\n`insert-directory-program', as any other option." #<bytecode 0x58f16ad3c799adf>)("/ftp:[email-masked]:/" "--dired -gohl --group-directories-first" nil t)
  ls-lisp--insert-directory(#f(compiled-function (file switches &optional wildcard full-directory-p) "Insert directory listing for FILE, formatted according to SWITCHES.\nLeaves point after the inserted text.\nSWITCHES may be a string of options, or a list of strings\nrepresenting individual options.\nOptional third arg WILDCARD means treat FILE as shell wildcard.\nOptional fourth arg FULL-DIRECTORY-P means file is a directory and\nswitches do not contain `d', so that a full listing is expected.\n\nThis works by running a directory listing program\nwhose name is in the variable `insert-directory-program'.\nIf WILDCARD, it also runs the shell specified by `shell-file-name'.\n\nWhen SWITCHES contains the long `--dired' option, this function\ntreats it specially, for the sake of dired.  However, the\nnormally equivalent short `-D' option is just passed on to\n`insert-directory-program', as any other option." #<bytecode 0x58f16ad3c799adf>) "/ftp:[email-masked]:/" "--dired -gohl --group-directories-first" nil t)
  apply(ls-lisp--insert-directory #f(compiled-function (file switches &optional wildcard full-directory-p) "Insert directory listing for FILE, formatted according to SWITCHES.\nLeaves point after the inserted text.\nSWITCHES may be a string of options, or a list of strings\nrepresenting individual options.\nOptional third arg WILDCARD means treat FILE as shell wildcard.\nOptional fourth arg FULL-DIRECTORY-P means file is a directory and\nswitches do not contain `d', so that a full listing is expected.\n\nThis works by running a directory listing program\nwhose name is in the variable `insert-directory-program'.\nIf WILDCARD, it also runs the shell specified by `shell-file-name'.\n\nWhen SWITCHES contains the long `--dired' option, this function\ntreats it specially, for the sake of dired.  However, the\nnormally equivalent short `-D' option is just passed on to\n`insert-directory-program', as any other option." #<bytecode 0x58f16ad3c799adf>) ("/ftp:[email-masked]:/" "--dired -gohl --group-directories-first" nil t))
  insert-directory("/ftp:[email-masked]:/" "--dired -gohl --group-directories-first" nil t)
  dired-insert-directory("/ftp:[email-masked]:/" "-gohl --group-directories-first" nil nil t)
  dired-readin-insert()
  #f(compiled-function () #<bytecode -0x2f6fb91d4b2d408>)()
  combine-change-calls-1(1 1 #f(compiled-function () #<bytecode -0x2f6fb91d4b2d408>))
  dired-readin()
  dired-internal-noselect("/ftp:[email-masked]:/" nil)
  dired-noselect("/ftp:[email-masked]:/")
  run-hook-with-args-until-success(dired-noselect "/ftp:[email-masked]:/")
  find-file-noselect("/ftp:[email-masked]:/" nil nil t)
  find-file("/ftp:[email-masked]:/" t)
  funcall-interactively(find-file "/ftp:[email-masked]:/" t)
  call-interactively(find-file nil nil)
  command-execute(find-file)

-- 
Jean Louis