From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jean Louis Newsgroups: gmane.emacs.bugs Subject: bug#43695: 28.0.50; FTP tramp fails with some dired listing switches Date: Wed, 30 Sep 2020 14:06:41 +0300 Message-ID: <20200930110641.GE31048@protected.rcdrun.com> References: <87d024h38b.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17445"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/1.14.0 (2020-05-02) Cc: 43695@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 30 13:08:44 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kNZyU-0004Pg-PZ for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 30 Sep 2020 13:08:42 +0200 Original-Received: from localhost ([::1]:37808 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kNZyT-0003dE-GB for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 30 Sep 2020 07:08:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56850) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kNZws-0002nx-Cm for bug-gnu-emacs@gnu.org; Wed, 30 Sep 2020 07:07:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46833) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kNZws-0001uO-3L for bug-gnu-emacs@gnu.org; Wed, 30 Sep 2020 07:07:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kNZwr-0002cu-TO for bug-gnu-emacs@gnu.org; Wed, 30 Sep 2020 07:07:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jean Louis Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 Sep 2020 11:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43695 X-GNU-PR-Package: emacs Original-Received: via spool by 43695-submit@debbugs.gnu.org id=B43695.160146401710086 (code B ref 43695); Wed, 30 Sep 2020 11:07:01 +0000 Original-Received: (at 43695) by debbugs.gnu.org; 30 Sep 2020 11:06:57 +0000 Original-Received: from localhost ([127.0.0.1]:58379 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kNZwn-0002cc-FK for submit@debbugs.gnu.org; Wed, 30 Sep 2020 07:06:57 -0400 Original-Received: from stw1.rcdrun.com ([217.170.207.13]:41289) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kNZwk-0002cL-LH for 43695@debbugs.gnu.org; Wed, 30 Sep 2020 07:06:56 -0400 Original-Received: from localhost ([::ffff:197.157.34.183]) (AUTH: PLAIN securesender, TLS: TLS1.2,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 00000000000F3C76.000000005F7466C5.000020F2; Wed, 30 Sep 2020 04:06:44 -0700 Content-Disposition: inline In-Reply-To: <87d024h38b.fsf@gmx.de> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:189328 Archived-At: * Michael Albinus [2020-09-29 21:01]: > Jean Louis 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))