unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Jean Louis <bugs@gnu.support>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: 43695@debbugs.gnu.org
Subject: bug#43695: 28.0.50; FTP tramp fails with some dired listing switches
Date: Wed, 30 Sep 2020 14:06:41 +0300	[thread overview]
Message-ID: <20200930110641.GE31048@protected.rcdrun.com> (raw)
In-Reply-To: <87d024h38b.fsf@gmx.de>

* Michael Albinus <michael.albinus@gmx.de> [2020-09-29 21:01]:
> Jean Louis <bugs@gnu.support> writes:
> 
> Hi Jean,
> 
> > So I think that my dired switches like "-gohl
> > --group-directories-first" are disturbing the FTP.
> >
> > Maybe special switches shall be used for FTP and special for dired, so
> > that such do not conflict.
> 
> ange-ftp has already a check for proper dired switches. Does the
> appended patch fixes your problem?
> 
> > Jean
> 
> Best regards, Michael.
> 

> *** /tmp/ediffSNrsg5	2020-09-29 19:59:25.357750430 +0200
> --- /home/albinus/src/emacs/lisp/net/ange-ftp.el	2020-09-29 19:59:09.169756302 +0200
> ***************
> *** 2835,2840 ****
> --- 2835,2843 ----
>          ;; Disallow recursive flag.
>          (not (string-match
>                "\\(\\`\\| \\)-[[:alpha:]]*R" switches))
> +        ;; Disallow do not list owner flag.  (Bug#43695)
> +        (not (string-match
> +              "\\(\\`\\| \\)-[[:alpha:]]*g" switches))
>          switches))
> 
>   (defun ange-ftp-get-files (directory &optional no-error)

As I cannot implement your patch easily and directly, I would just
like to re-define the function, is it this one? Please send me your
function in complete, that I can try it out.

(defun ange-ftp-switches-ok (switches)
  "Return SWITCHES (a string) if suitable for use with ls over ftp."
  (and (stringp switches)
       ;; We allow the --almost-all switch, which lists all files
       ;; except "." and "..".  This is OK because we manually
       ;; insert these entries in the hash table.
       (string-match
        "--\\(almost-\\)?all\\>\\|\\(\\`\\| \\)-[[:alpha:]]*[aA]"
        switches)
       ;; Disallow other long flags except --(almost-)all.
       (not (string-match "\\(\\`\\| \\)--\\w+"
                          (replace-regexp-in-string
                           "--\\(almost-\\)?all\\>" ""
                           switches)))
       ;; Must include 'l'.
       (string-match "\\(\\`\\| \\)-[[:alpha:]]*l" switches)
       ;; Disallow recursive flag.
       (not (string-match
             "\\(\\`\\| \\)-[[:alpha:]]*R" switches))
       switches))





  reply	other threads:[~2020-09-30 11:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-29  6:47 bug#43695: 28.0.50; FTP tramp fails with some dired listing switches Jean Louis
2020-09-29 18:01 ` Michael Albinus
2020-09-30 11:06   ` Jean Louis [this message]
2020-09-30 11:29     ` Michael Albinus
2020-09-30 15:01       ` Jean Louis
2020-09-30 16:58         ` Michael Albinus
2020-10-18 15:09           ` Michael Albinus
2020-10-18 16:20             ` Jean Louis
2020-10-18 16:35               ` Michael Albinus
2020-10-28 11:49           ` Jean Louis
2020-11-14  9:10             ` Michael Albinus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200930110641.GE31048@protected.rcdrun.com \
    --to=bugs@gnu.support \
    --cc=43695@debbugs.gnu.org \
    --cc=michael.albinus@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).