From unknown Mon Jun 23 22:03:45 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#19192 <19192@debbugs.gnu.org> To: bug#19192 <19192@debbugs.gnu.org> Subject: Status: 25.0.50; TRAMP uses `dired-listing-switches' for ftp-connection Reply-To: bug#19192 <19192@debbugs.gnu.org> Date: Tue, 24 Jun 2025 05:03:45 +0000 retitle 19192 25.0.50; TRAMP uses `dired-listing-switches' for ftp-connecti= on=20 reassign 19192 emacs submitter 19192 Rasmus severity 19192 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 26 07:04:21 2014 Received: (at submit) by debbugs.gnu.org; 26 Nov 2014 12:04:21 +0000 Received: from localhost ([127.0.0.1]:45643 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XtbKV-0001Ef-Sd for submit@debbugs.gnu.org; Wed, 26 Nov 2014 07:04:21 -0500 Received: from eggs.gnu.org ([208.118.235.92]:40200) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XtbKR-0001EV-Ow for submit@debbugs.gnu.org; Wed, 26 Nov 2014 07:04:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XtbKK-0000iq-01 for submit@debbugs.gnu.org; Wed, 26 Nov 2014 07:04:15 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:54058) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XtbKJ-0000ii-TE for submit@debbugs.gnu.org; Wed, 26 Nov 2014 07:04:07 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41813) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XtbKC-000729-Jq for bug-gnu-emacs@gnu.org; Wed, 26 Nov 2014 07:04:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XtbK6-0000e7-8I for bug-gnu-emacs@gnu.org; Wed, 26 Nov 2014 07:04:00 -0500 Received: from mout.gmx.net ([212.227.15.18]:49394) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XtbK5-0000ds-Jh for bug-gnu-emacs@gnu.org; Wed, 26 Nov 2014 07:03:53 -0500 Received: from W530 ([37.135.96.168]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0Ln8Tl-1YP7By46Av-00hQNy for ; Wed, 26 Nov 2014 13:03:52 +0100 From: Rasmus To: bug-gnu-emacs@gnu.org Subject: 25.0.50; TRAMP uses `dired-listing-switches' for ftp-connection Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAAAAAByaaZbAAAAAmJLR0QA/4ePzL8AAAAJcEhZ cwAAAEgAAABIAEbJaz4AAAIDSURBVEjHhZbLlSUhDEMJR2EptZuQY5oFtjHF6zMsqhdtIfkn3rKx zf6TB9sGAxGRn/yuHYtty5I0UDgigyueZRt2/Dm2kjEiApMExstsOboAKkY7Am9dgFnGsO+3ksaF kCQTUcpsL88zEMbaFAUIbHn5qo9dKdhkEZrABZiIuj8pJHHud0rikSRLhp0CR4+sVeF8C2sHklQA 9j/W1HIdm/CpEhmynrsHB9FZcwD4b8DWQUDA7s6a9fHMwLYJu7KOHbVOffLbk2GbwEQE3WivHuyE ZBdy/nJMAwBka41NUAUmHBuC02dLlcPstaXDSFzx72gMdRswCLqsfBguSJWoEK+kMVW9cxtQDPwV P0YvyNntPtwQJcDdhvaIdRNw9d3HaHoV16OnK+5eT6Aao0UH8YXqVDUkEZZZlxoOSrOqIAmkYzMj E07imXQEsgtQVpq4NIeaLFrUXlHWlM9jB92HuPtAqz85jHhgNI7hG01Rm7cdtfQUwxk/hiV4OweU fXxshqume/a2Z/AD8OnB2D0J7NBH0ukxYxlqXfHFwHi0xvCN5gE3Qwfze09hSnpnome1HephqIS5 nL9eLs02aJ2U+eTQT9HMWcs/jtKclIIGwWzc97E7ZeV/DGe+/c25AHrDR1l1Aa7LXLmeFPQA9gOS z0hF9yMh4RvQy1Xj1jbWP1Tm+Qe9IHnKji7ROAAAAABJRU5ErkJggg== Date: Wed, 26 Nov 2014 13:03:49 +0100 Message-ID: <87tx1mrwwq.fsf@gmx.us> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:qPmOrC7RuuOTyOsEi/MCJHALmJrIV/vRXmxfK47NM8Oe6JdDJSK uXUeSivBhlk8Yv7XvLPx+wc0Zot5pa1GXx2gF4elcZwZclQPv/Qk8ResoU1jLt1MqZPrUT1 JHURJjUn5aiQgJIaDSNfIZSXvu1PqZVZqnlII8dIRZO3NRyqE/K4ivDx3kwU/Tq2GUrPpG0 9btAIFlC2KdpYEvDklSCg== X-UI-Out-Filterresults: notjunk:1; X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Hi, I want to use TRAMP for editing files over ftp. I my init.el I have augmented `dired-listing-switches' with "--group-directories-first" to get a more pleasing listing in dired. However, this extra flag is added to whatever tramp calls to connect to ftp. So in the ftp buffer I see something like this: ftp> ls -al --group-directories-first /tmp/ange-ftp19481AaR usage: ls remote-directory local-file When I wrap find-file in a `let' with dired-listing-switches set to "-al" everything works as expected. I don't know if this is a feature or a bug. Michael: do you want me to write a patch or will this be a quick fix for you? Thanks, Rasmus In GNU Emacs 25.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.14.5) of 2014-11-25 on W530 Repository revision: 27f46ae31cd289dbff4c521fcf37a1d048693f6e Windowing system distributor `The X.Org Foundation', version 11.0.11602000 System Description: Arch Linux Configured using: `configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libexecdir=/usr/lib --mandir=/usr/share/man --without-sound --with-xft --with-x-toolkit=gtk3 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4' 'LDFLAGS=-lMagickWand-6.Q16HDRI -lMagickCore-6.Q16HDRI ' CPPFLAGS=-D_FORTIFY_SOURCE=2' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK GPM DBUS GCONF GSETTINGS NOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB Important settings: value of $LANG: es_ES.utf8 locale-coding-system: utf-8-unix Major mode: Emacs-Lisp Minor modes in effect: recentf-mode: t diff-auto-refine-mode: t nyan-mode: t paredit-mode: t flyspell-mode: t subword-mode: t shell-dirtrack-mode: t global-company-mode: t company-mode: t ido-everywhere: t global-auto-revert-mode: t which-function-mode: t winner-mode: t delete-selection-mode: t show-paren-mode: t electric-pair-mode: t savehist-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-layout-mode: t electric-indent-mode: t mouse-wheel-mode: t prettify-symbols-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t global-visual-line-mode: t visual-line-mode: t Recent messages: Auto-saving...done Deleting escape. paredit-backslash-interactive: Wrong type argument: characterp, 134217830 Character to escape: \ Doing CD...done Listing /ftp:rasmus@ssl.eumx.net:/... [2 times] Doing CD...done Listing /ftp:rasmus@ssl.eumx.net:/... [2 times] tramp-file-name-handler: FTP Error: DIR failed: usage: ls remote-directory local-file Undo! Load-path shadows: ~/.emacs.d/lisp/abbrev hides /usr/share/emacs/25.0.50/lisp/abbrev /usr/share/emacs/site-lisp/org/ox-odt hides /usr/share/emacs/25.0.50/lisp/org/ox-odt /usr/share/emacs/site-lisp/org/ox-texinfo hides /usr/share/emacs/25.0.50/lisp/org/ox-texinfo /usr/share/emacs/site-lisp/org/ox-publish hides /usr/share/emacs/25.0.50/lisp/org/ox-publish /usr/share/emacs/site-lisp/org/ox-org hides /usr/share/emacs/25.0.50/lisp/org/ox-org /usr/share/emacs/site-lisp/org/ox-latex hides /usr/share/emacs/25.0.50/lisp/org/ox-latex /usr/share/emacs/site-lisp/org/ox-md hides /usr/share/emacs/25.0.50/lisp/org/ox-md /usr/share/emacs/site-lisp/org/ox-man hides /usr/share/emacs/25.0.50/lisp/org/ox-man /usr/share/emacs/site-lisp/org/ox-html hides /usr/share/emacs/25.0.50/lisp/org/ox-html /usr/share/emacs/site-lisp/org/ox-icalendar hides /usr/share/emacs/25.0.50/lisp/org/ox-icalendar /usr/share/emacs/site-lisp/org/ox hides /usr/share/emacs/25.0.50/lisp/org/ox /usr/share/emacs/site-lisp/org/ox-beamer hides /usr/share/emacs/25.0.50/lisp/org/ox-beamer /usr/share/emacs/site-lisp/org/ox-ascii hides /usr/share/emacs/25.0.50/lisp/org/ox-ascii /usr/share/emacs/site-lisp/org/org-w3m hides /usr/share/emacs/25.0.50/lisp/org/org-w3m /usr/share/emacs/site-lisp/org/org-table hides /usr/share/emacs/25.0.50/lisp/org/org-table /usr/share/emacs/site-lisp/org/org-timer hides /usr/share/emacs/25.0.50/lisp/org/org-timer /usr/share/emacs/site-lisp/org/org-protocol hides /usr/share/emacs/25.0.50/lisp/org/org-protocol /usr/share/emacs/site-lisp/org/org-rmail hides /usr/share/emacs/25.0.50/lisp/org/org-rmail /usr/share/emacs/site-lisp/org/org-irc hides /usr/share/emacs/25.0.50/lisp/org/org-irc /usr/share/emacs/site-lisp/org/org-src hides /usr/share/emacs/25.0.50/lisp/org/org-src /usr/share/emacs/site-lisp/org/org-plot hides /usr/share/emacs/25.0.50/lisp/org/org-plot /usr/share/emacs/site-lisp/org/org-mobile hides /usr/share/emacs/25.0.50/lisp/org/org-mobile /usr/share/emacs/site-lisp/org/org-mouse hides /usr/share/emacs/25.0.50/lisp/org/org-mouse /usr/share/emacs/site-lisp/org/org-pcomplete hides /usr/share/emacs/25.0.50/lisp/org/org-pcomplete /usr/share/emacs/site-lisp/org/org-mhe hides /usr/share/emacs/25.0.50/lisp/org/org-mhe /usr/share/emacs/site-lisp/org/org-inlinetask hides /usr/share/emacs/25.0.50/lisp/org/org-inlinetask /usr/share/emacs/site-lisp/org/org-info hides /usr/share/emacs/25.0.50/lisp/org/org-info /usr/share/emacs/site-lisp/org/org-indent hides /usr/share/emacs/25.0.50/lisp/org/org-indent /usr/share/emacs/site-lisp/org/org-macs hides /usr/share/emacs/25.0.50/lisp/org/org-macs /usr/share/emacs/site-lisp/org/org-id hides /usr/share/emacs/25.0.50/lisp/org/org-id /usr/share/emacs/site-lisp/org/org-habit hides /usr/share/emacs/25.0.50/lisp/org/org-habit /usr/share/emacs/site-lisp/org/org-macro hides /usr/share/emacs/25.0.50/lisp/org/org-macro /usr/share/emacs/site-lisp/org/org-gnus hides /usr/share/emacs/25.0.50/lisp/org/org-gnus /usr/share/emacs/site-lisp/org/org-list hides /usr/share/emacs/25.0.50/lisp/org/org-list /usr/share/emacs/site-lisp/org/org hides /usr/share/emacs/25.0.50/lisp/org/org /usr/share/emacs/site-lisp/org/org-feed hides /usr/share/emacs/25.0.50/lisp/org/org-feed /usr/share/emacs/site-lisp/org/org-element hides /usr/share/emacs/25.0.50/lisp/org/org-element /usr/share/emacs/site-lisp/org/org-eshell hides /usr/share/emacs/25.0.50/lisp/org/org-eshell /usr/share/emacs/site-lisp/org/org-footnote hides /usr/share/emacs/25.0.50/lisp/org/org-footnote /usr/share/emacs/site-lisp/org/org-docview hides /usr/share/emacs/25.0.50/lisp/org/org-docview /usr/share/emacs/site-lisp/org/org-datetree hides /usr/share/emacs/25.0.50/lisp/org/org-datetree /usr/share/emacs/site-lisp/org/org-ctags hides /usr/share/emacs/25.0.50/lisp/org/org-ctags /usr/share/emacs/site-lisp/org/org-crypt hides /usr/share/emacs/25.0.50/lisp/org/org-crypt /usr/share/emacs/site-lisp/org/org-faces hides /usr/share/emacs/25.0.50/lisp/org/org-faces /usr/share/emacs/site-lisp/org/org-entities hides /usr/share/emacs/25.0.50/lisp/org/org-entities /usr/share/emacs/site-lisp/org/org-agenda hides /usr/share/emacs/25.0.50/lisp/org/org-agenda /usr/share/emacs/site-lisp/org/org-colview hides /usr/share/emacs/25.0.50/lisp/org/org-colview /usr/share/emacs/site-lisp/org/org-clock hides /usr/share/emacs/25.0.50/lisp/org/org-clock /usr/share/emacs/site-lisp/org/org-compat hides /usr/share/emacs/25.0.50/lisp/org/org-compat /usr/share/emacs/site-lisp/org/org-capture hides /usr/share/emacs/25.0.50/lisp/org/org-capture /usr/share/emacs/site-lisp/org/org-bibtex hides /usr/share/emacs/25.0.50/lisp/org/org-bibtex /usr/share/emacs/site-lisp/org/org-bbdb hides /usr/share/emacs/25.0.50/lisp/org/org-bbdb /usr/share/emacs/site-lisp/org/org-attach hides /usr/share/emacs/25.0.50/lisp/org/org-attach /usr/share/emacs/site-lisp/org/org-archive hides /usr/share/emacs/25.0.50/lisp/org/org-archive /usr/share/emacs/site-lisp/org/ob-tangle hides /usr/share/emacs/25.0.50/lisp/org/ob-tangle /usr/share/emacs/site-lisp/org/ob-sqlite hides /usr/share/emacs/25.0.50/lisp/org/ob-sqlite /usr/share/emacs/site-lisp/org/ob-sql hides /usr/share/emacs/25.0.50/lisp/org/ob-sql /usr/share/emacs/site-lisp/org/ob-table hides /usr/share/emacs/25.0.50/lisp/org/ob-table /usr/share/emacs/site-lisp/org/ob-shen hides /usr/share/emacs/25.0.50/lisp/org/ob-shen /usr/share/emacs/site-lisp/org/ob-screen hides /usr/share/emacs/25.0.50/lisp/org/ob-screen /usr/share/emacs/site-lisp/org/ob-scala hides /usr/share/emacs/25.0.50/lisp/org/ob-scala /usr/share/emacs/site-lisp/org/ob-scheme hides /usr/share/emacs/25.0.50/lisp/org/ob-scheme /usr/share/emacs/site-lisp/org/ob-sass hides /usr/share/emacs/25.0.50/lisp/org/ob-sass /usr/share/emacs/site-lisp/org/ob-ruby hides /usr/share/emacs/25.0.50/lisp/org/ob-ruby /usr/share/emacs/site-lisp/org/ob-R hides /usr/share/emacs/25.0.50/lisp/org/ob-R /usr/share/emacs/site-lisp/org/ob-ref hides /usr/share/emacs/25.0.50/lisp/org/ob-ref /usr/share/emacs/site-lisp/org/ob-python hides /usr/share/emacs/25.0.50/lisp/org/ob-python /usr/share/emacs/site-lisp/org/ob-plantuml hides /usr/share/emacs/25.0.50/lisp/org/ob-plantuml /usr/share/emacs/site-lisp/org/ob-picolisp hides /usr/share/emacs/25.0.50/lisp/org/ob-picolisp /usr/share/emacs/site-lisp/org/ob-perl hides /usr/share/emacs/25.0.50/lisp/org/ob-perl /usr/share/emacs/site-lisp/org/ob-org hides /usr/share/emacs/25.0.50/lisp/org/ob-org /usr/share/emacs/site-lisp/org/ob-octave hides /usr/share/emacs/25.0.50/lisp/org/ob-octave /usr/share/emacs/site-lisp/org/ob-ocaml hides /usr/share/emacs/25.0.50/lisp/org/ob-ocaml /usr/share/emacs/site-lisp/org/ob-mscgen hides /usr/share/emacs/25.0.50/lisp/org/ob-mscgen /usr/share/emacs/site-lisp/org/ob-maxima hides /usr/share/emacs/25.0.50/lisp/org/ob-maxima /usr/share/emacs/site-lisp/org/ob-matlab hides /usr/share/emacs/25.0.50/lisp/org/ob-matlab /usr/share/emacs/site-lisp/org/ob-lisp hides /usr/share/emacs/25.0.50/lisp/org/ob-lisp /usr/share/emacs/site-lisp/org/ob-makefile hides /usr/share/emacs/25.0.50/lisp/org/ob-makefile /usr/share/emacs/site-lisp/org/ob-lilypond hides /usr/share/emacs/25.0.50/lisp/org/ob-lilypond /usr/share/emacs/site-lisp/org/ob-lob hides /usr/share/emacs/25.0.50/lisp/org/ob-lob /usr/share/emacs/site-lisp/org/ob-ledger hides /usr/share/emacs/25.0.50/lisp/org/ob-ledger /usr/share/emacs/site-lisp/org/ob-fortran hides /usr/share/emacs/25.0.50/lisp/org/ob-fortran /usr/share/emacs/site-lisp/org/ob-latex hides /usr/share/emacs/25.0.50/lisp/org/ob-latex /usr/share/emacs/site-lisp/org/ob-js hides /usr/share/emacs/25.0.50/lisp/org/ob-js /usr/share/emacs/site-lisp/org/ob-java hides /usr/share/emacs/25.0.50/lisp/org/ob-java /usr/share/emacs/site-lisp/org/ob-keys hides /usr/share/emacs/25.0.50/lisp/org/ob-keys /usr/share/emacs/site-lisp/org/ob-io hides /usr/share/emacs/25.0.50/lisp/org/ob-io /usr/share/emacs/site-lisp/org/ob-haskell hides /usr/share/emacs/25.0.50/lisp/org/ob-haskell /usr/share/emacs/site-lisp/org/ob-gnuplot hides /usr/share/emacs/25.0.50/lisp/org/ob-gnuplot /usr/share/emacs/site-lisp/org/ob-exp hides /usr/share/emacs/25.0.50/lisp/org/ob-exp /usr/share/emacs/site-lisp/org/ob-C hides /usr/share/emacs/25.0.50/lisp/org/ob-C /usr/share/emacs/site-lisp/org/ob-emacs-lisp hides /usr/share/emacs/25.0.50/lisp/org/ob-emacs-lisp /usr/share/emacs/site-lisp/org/ob hides /usr/share/emacs/25.0.50/lisp/org/ob /usr/share/emacs/site-lisp/org/ob-eval hides /usr/share/emacs/25.0.50/lisp/org/ob-eval /usr/share/emacs/site-lisp/org/ob-dot hides /usr/share/emacs/25.0.50/lisp/org/ob-dot /usr/share/emacs/site-lisp/org/ob-ditaa hides /usr/share/emacs/25.0.50/lisp/org/ob-ditaa /usr/share/emacs/site-lisp/org/ob-core hides /usr/share/emacs/25.0.50/lisp/org/ob-core /usr/share/emacs/site-lisp/org/ob-css hides /usr/share/emacs/25.0.50/lisp/org/ob-css /usr/share/emacs/site-lisp/org/ob-comint hides /usr/share/emacs/25.0.50/lisp/org/ob-comint /usr/share/emacs/site-lisp/org/ob-clojure hides /usr/share/emacs/25.0.50/lisp/org/ob-clojure /usr/share/emacs/site-lisp/org/ob-calc hides /usr/share/emacs/25.0.50/lisp/org/ob-calc /usr/share/emacs/site-lisp/org/ob-awk hides /usr/share/emacs/25.0.50/lisp/org/ob-awk /usr/share/emacs/site-lisp/org/ob-asymptote hides /usr/share/emacs/25.0.50/lisp/org/ob-asymptote /usr/share/emacs/site-lisp/org/org-loaddefs hides /usr/share/emacs/25.0.50/lisp/org/org-loaddefs /usr/share/emacs/site-lisp/org/org-version hides /usr/share/emacs/25.0.50/lisp/org/org-version /usr/share/emacs/site-lisp/org/org-install hides /usr/share/emacs/25.0.50/lisp/org/org-install /home/rasmus/.emacs.d/elpa/emms-20141104.1238/tq hides /usr/share/emacs/25.0.50/lisp/emacs-lisp/tq Features: (shadow emacsbug debug ange-ftp tramp-ftp vc-git ffap thingatpt recentf tree-widget smex misearch multi-isearch emms-player-mpv emms-info-libtag emms-librefm-stream emms-librefm-scrobbler emms-playlist-limit emms-volume emms-volume-amixer emms-i18n emms-history emms-score emms-stream-info emms-metaplaylist-mode emms-bookmarks emms-cue emms-mode-line-icon emms-browser emms-playlist-sort emms-last-played emms-player-xine emms-player-mpd tq emms-playing-time emms-lyrics emms-url emms-streams emms-tag-editor emms-mark emms-mode-line emms-cache emms-info-ogginfo emms-info-mp3info emms-info later-do emms-playlist-mode emms-player-vlc emms-player-mplayer emms-player-simple emms-source-playlist emms-source-file locate emms-setup emms emms-compat org-table quail help-mode footnote autocap cookie1 flow-fill picture rect shr pp gnus-html browse-url mm-url diff-mode tramp-cache arc-mode archive-mode mule-util gnus-gravatar gnus-picon sort org-indent cdlatex texmathp reftex reftex-vars org-rmail org-mhe org-irc org-info org-gnus org-docview doc-view jka-compr image-mode org-bibtex bibtex org-bbdb org-w3m bbdb-anniv diary-lib diary-loaddefs org-element avl-tree key-chord org-inlinetask org org-macro org-footnote org-pcomplete org-list org-faces org-entities noutline outline easy-mmode org-version ob-shell ob-awk ob-org ob-octave ob-python ob-C ob-emacs-lisp ob-fortran cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs ob-latex ob-R ob ob-tangle ob-ref ob-lob ob-table ob-exp org-src ob-keys ob-comint ob-core ob-eval org-compat org-macs org-loaddefs find-func cal-menu calendar cal-loaddefs smiley gnus-cite mm-archive gnus-bcklg url-http url-gw url-auth gravatar url-cache url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util url-parse url-vars mail-extr gnus-notifications gnus-fun notifications dbus xml gnus-async qp gnus-ml disp-table gnus-topic hl-line utf-7 epa-file epa derived epg gnutls network-stream nsm starttls nnfolder nnnil gnus-demon gnus-harvest cl bbdb-com crm bbdb bbdb-site timezone mailalias nnir smtpmail-async smtpmail sendmail async gnus-delay gnus-draft gnus-agent gnus-srvr gnus-score score-mode nnvirtual nntp gnus-cache gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime smime dig mailcap gnus-sum nndraft nnmh gnus-group gnus-undo gnus-start gnus-cloud nnimap tls utf7 netrc parse-time gnus-spec nnmail gnus-int gnus-range mail-source message idna dired-x dired rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils mailheader gnus-win nnoo gnus gnus-ems nnheader mail-utils wid-edit gnus-switch nyan-mode server paredit flyspell ispell cap-words superword subword company-files company-oddmuse company-keywords company-etags etags company-gtags company-dabbrev-code company-dabbrev company-capf company-cmake company-xcode company-clang company-semantic company-eclim company-template company-css company-nxml company-bbdb company-c-headers rx company-anaconda anaconda-mode f s ucs-normalize dash tramp tramp-compat auth-source eieio byte-opt bytecomp byte-compile cl-extra cconv eieio-core gnus-util mm-util mail-prsvr password-cache tramp-loaddefs trampver readline-complete shell pcomplete format-spec advice help-fns json-rpc python json comint ansi-color company ido autorevert filenotify which-func imenu winner ring windmove delsel paren elec-pair savehist saveplace cl-macs gv time-date edmacro kmacro cl-loaddefs cl-lib tex-site info easymenu package epg-config tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind gfilenotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) Memory information: ((conses 16 778835 109033) (symbols 48 53756 0) (miscs 40 2746 1729) (strings 32 180844 20191) (string-bytes 1 5291883) (vectors 16 81596) (vector-slots 8 2011734 224119) (floats 8 580 1975) (intervals 56 8137 12797) (buffers 976 80) (heap 1024 99311 10674)) -- With monopolies the cake is a lie! From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 26 08:36:04 2014 Received: (at 19192) by debbugs.gnu.org; 26 Nov 2014 13:36:05 +0000 Received: from localhost ([127.0.0.1]:45688 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XtclI-0004rk-IX for submit@debbugs.gnu.org; Wed, 26 Nov 2014 08:36:04 -0500 Received: from mout.gmx.net ([212.227.15.19]:62660) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XtclF-0004rM-Uy for 19192@debbugs.gnu.org; Wed, 26 Nov 2014 08:36:02 -0500 Received: from detlef.gmx.de ([79.195.16.180]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0M1n4s-1YDm0o2mXS-00toRV; Wed, 26 Nov 2014 14:36:00 +0100 From: Michael Albinus To: Rasmus Subject: Re: bug#19192: 25.0.50; TRAMP uses `dired-listing-switches' for ftp-connection References: <87tx1mrwwq.fsf@gmx.us> Date: Wed, 26 Nov 2014 14:35:59 +0100 In-Reply-To: <87tx1mrwwq.fsf@gmx.us> (rasmus@gmx.us's message of "Wed, 26 Nov 2014 13:03:49 +0100") Message-ID: <87zjbe9j9c.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:0utOumAarJ7AeKemO8dEtLCqnw7nFTwCxftMnooxYMYu/wJZHXa Nsn4HkMvGaPuRwW70k8jWMHyxuTW+F9/M8AOw+FZVhr9I2QFsVL5ZP94vo5uXatLXuX4pxs Tn4YqjPhmndl54Yen/evTXmhngTehy3rB2uXWtnVAmnl5qK28sWAQnaBR+MN3UBfj4jwQm5 d78SnZWyykKt1ZuGZKtUA== X-UI-Out-Filterresults: notjunk:1; X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 19192 Cc: 19192@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Rasmus writes: > Hi, Hi Rasmus, > I don't know if this is a feature or a bug. > > Michael: do you want me to write a patch or will this be a quick fix for > you? Likely, it is a feature. So I don't know whether we can fix this quickly. However, if you want to investigate it, it is likely in ange-ftp.el. Tramp doesn't care about ftp connections, it let ange-ftp.el do the job. A possible fix might be to give a user an option, whether global dired-listing-switches shall be used everywhere, or whether there shall be special settings connection-oriented. > Thanks, > Rasmus Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 26 18:46:09 2014 Received: (at 19192) by debbugs.gnu.org; 26 Nov 2014 23:46:09 +0000 Received: from localhost ([127.0.0.1]:46716 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XtmHh-0000oA-Ca for submit@debbugs.gnu.org; Wed, 26 Nov 2014 18:46:09 -0500 Received: from mout.gmx.net ([212.227.15.15]:54145) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XtmHd-0000ns-7h for 19192@debbugs.gnu.org; Wed, 26 Nov 2014 18:46:06 -0500 Received: from W530 ([46.166.186.244]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0Mdren-1XZ6lM1vpd-00Pcdw; Thu, 27 Nov 2014 00:46:02 +0100 From: Rasmus To: michael.albinus@gmx.de Subject: Re: bug#19192: 25.0.50; TRAMP uses `dired-listing-switches' for ftp-connection References: <87tx1mrwwq.fsf@gmx.us> <87zjbe9j9c.fsf@gmx.de> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAANlBMVEX+/v7f3+CTk5O/v8C/ wMHPz8+fn6Cvr7C/wL92dXahoZ/AwL9MTEyAgH9gX19+f4AwLzN/gIBRedkoAAAACXBIWXMAAABI AAAASABGyWs+AAABfUlEQVRIDd3B0VbbQBBEwdstzYx3BYL8/88GYTCytD5xHpMq/gGyp5m/EInK xfMs4JLBs9TYZOdZ0diExZOisVHjGVGhamyi8UCJb2qVruTT1BkKZ4ovZsdiJJJwcBVN3CgZagJP fPHCTQYjaoIsNmEXNzInilryRZAFyGIvxUG89mmeJwFZgIM9JQc9uXEA6YUdc1S+iC/mgxs7FRwo X1ZxNRfQ2FNxr79N4qYL5IUdc68He1MIWvAjxR3ZYk9C4keKg7k1u4sHOiOqtTMiOg8EI9mCxyRO ojkYirf1tVmcRDaBOPAaHElsZidKcW9loAKIjGRdm8VeFQNeyjlX87unEDeKOV5Wzpa2CGaxF79a a3YWZ9E5m9bgEQcDsvsiBi5mLPz+xtnUxICytRQnYTMg58KZyilGmjgLu8RYBgfKluJKTRyVS3yR FjsnvskhdAlXEWGuFOXszp5pX4KdFIKoJYJ7+sTRpap6Zs+Ne9XCn+hDzDEvl6k24j/wGxJYCCwe kUkPAAAAAElFTkSuQmCC Date: Thu, 27 Nov 2014 00:45:36 +0100 In-Reply-To: <87zjbe9j9c.fsf@gmx.de> (Michael Albinus's message of "Wed, 26 Nov 2014 14:35:59 +0100") Message-ID: <87h9xlil0f.fsf@gmx.us> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:HI3sirHQwZm9O77Bi6re7/DVM5AmJorGpFFnLwdHtFC14+d4shS KMLBpLBrUA4NVOE1q3xOtr7X+Zuu38IhND9f/icC2bQJBPHxHCcCCYA6iOdStuz4VlMOb3u Nh7I7cMCvNDsf34elIS8SaAFzFNVXKjmFlRba4PKh7dU9dyGFmiwY/ff9YoGozQ88r64Rt/ ASHd3sd1QnQjAvmt+J4NQ== X-UI-Out-Filterresults: notjunk:1; X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 19192 Cc: 19192@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Hi, Michael Albinus writes: > Rasmus writes: >> I don't know if this is a feature or a bug. >> >> Michael: do you want me to write a patch or will this be a quick fix for >> you? > > Likely, it is a feature. So I don't know whether we can fix this quickly. I agree. > However, if you want to investigate it, it is likely in > ange-ftp.el. Tramp doesn't care about ftp connections, it let > ange-ftp.el do the job. Thanks for pointing this out. > A possible fix might be to give a user an option, whether global > dired-listing-switches shall be used everywhere, or whether there shall > be special settings connection-oriented. So it turns out that arguments are tested via `ange-ftp-switches-ok'. So the easiest fix would probably be to extend this function to do a better job of checking. Unfortunately, I don't know if one can easily predict which ls commands will be understood and which not? E.g. does ftp ls depend on the host systems version of ls? Thanks, Rasmus -- Summon the Mothership! From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 29 05:42:41 2014 Received: (at 19192) by debbugs.gnu.org; 29 Nov 2014 10:42:41 +0000 Received: from localhost ([127.0.0.1]:48858 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XufU8-0004cI-VU for submit@debbugs.gnu.org; Sat, 29 Nov 2014 05:42:41 -0500 Received: from mout.gmx.net ([212.227.17.22]:50960) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XufU6-0004c7-Qd for 19192@debbugs.gnu.org; Sat, 29 Nov 2014 05:42:39 -0500 Received: from detlef.gmx.de ([79.195.2.16]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0M1BMy-1YA0Xd0pjM-00tALx; Sat, 29 Nov 2014 11:42:37 +0100 From: Michael Albinus To: Rasmus Subject: Re: bug#19192: 25.0.50; TRAMP uses `dired-listing-switches' for ftp-connection References: <87tx1mrwwq.fsf@gmx.us> <87zjbe9j9c.fsf@gmx.de> <87h9xlil0f.fsf@gmx.us> Date: Sat, 29 Nov 2014 11:42:35 +0100 In-Reply-To: <87h9xlil0f.fsf@gmx.us> (rasmus@gmx.us's message of "Thu, 27 Nov 2014 00:45:36 +0100") Message-ID: <877fye2spw.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:fW+wud58L524hzZtJwteJjlQpOChK6lSY//duxI4RvUpmGxDMOY RrqdZ5eJDiXihXLpzUvYznCXGBeb2cPArkZPra6vKOxOy1xOEuYiT00De92XvKB6hThRFzI QN4T/3FNIgBvXLJytAm987DRdGEgO8/DzCkjR4sM6fwtWcfUTvL3WuO9WKgBGzUtFVoQ/+e utxVXi91wAKgKb1MFfLtw== X-UI-Out-Filterresults: notjunk:1; X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 19192 Cc: 19192@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Rasmus writes: > Hi, Hi Rasmus, >> A possible fix might be to give a user an option, whether global >> dired-listing-switches shall be used everywhere, or whether there shall >> be special settings connection-oriented. > > So it turns out that arguments are tested via `ange-ftp-switches-ok'. > So the easiest fix would probably be to extend this function to do a > better job of checking. Unfortunately, I don't know if one can easily > predict which ls commands will be understood and which not? E.g. does > ftp ls depend on the host systems version of ls? I don't know exactly. But I guess the most stable patch would be to not expect too much from ftp's ls. > Thanks, > Rasmus Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 29 06:16:55 2014 Received: (at 19192) by debbugs.gnu.org; 29 Nov 2014 11:16:55 +0000 Received: from localhost ([127.0.0.1]:48877 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xug1G-0005QD-Ma for submit@debbugs.gnu.org; Sat, 29 Nov 2014 06:16:54 -0500 Received: from mout.gmx.net ([212.227.15.18]:51850) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xug1D-0005Q4-D3 for 19192@debbugs.gnu.org; Sat, 29 Nov 2014 06:16:52 -0500 Received: from W530 ([37.135.96.168]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0MUZKF-1XUaKK43pT-00RJPy; Sat, 29 Nov 2014 12:16:49 +0100 From: Rasmus To: michael.albinus@gmx.de Subject: Re: bug#19192: 25.0.50; TRAMP uses `dired-listing-switches' for ftp-connection References: <87tx1mrwwq.fsf@gmx.us> <87zjbe9j9c.fsf@gmx.de> <87h9xlil0f.fsf@gmx.us> <877fye2spw.fsf@gmx.de> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAElBMVEUvLy91dXVUVFSRkZGs rKzQ0NCgYj8zAAACUUlEQVQ4y2XTXZKbMAwAYONeAEn03RJ7gAiZ9ya235sG3/8qFbBkd1oNM5nx F/1YDOEdUUDC/xHBlNTpH4ymYOACsMX0DchAgcDI2uPx7XzYz00NaessGObxKmRGpkWxtQfjOJer kAI1bQvCdvdOAsu7EE39Y4uaoLUXAbwTtKzPducUIgGDJoZxTyBbresLJTAmAQA2DR5s9PrZOfe+ Fe/mD5+1QFddnx99AzOVPVjTsQxYoY+Mnqvc+mYo8ZgJ9MmKAmbL3D2qzntC+gHTAsF7kg59j4JH BxkIOEURQPzZe+v9BemYaVBEAD+n2+qD+YMHDIKSOLCQ/drB8obHCiOyAQZhstvUu6UIJwzC++TM cMB9nyccECUFBgQqt9o7Sojp7DFIFAYgssVb8J/A59IjSHIgpbzDimH+84YkDlYfza99j9MznHGA qeX9HkV5fX0Bk4HV24ePe4f6BYGpgOXxR+8ZJG/neXQAulPN4+yvCjn376C5rH7BWpLUnk6IDqbF m081q0DMnyBfYAUHQvnsfUKu+UZkKIDXUFEOKHkk0iQSLhAH1bU2gQlE+Hm18JpkVLctggFKkfAF s1ltfyIZyLxckE7o/RbYkCco10JGDNFy75wiKVh7nT1Y0Oebc3+Keor/436CCLK/x/YShsUl3/EC 8Z0MJkILLUHAp79gGMOsDoakIfr51WMeYzaUbAr0O15frESkNGfVyZeigNHeACC5bVZrMc+Jt/AG +ah1K1RrLgV4/ASMMNRWt1qglloVbm/AyY+9jlL2H3yc1/gLV++FkXU0IfkAAAAASUVORK5CYII= Date: Sat, 29 Nov 2014 12:16:43 +0100 In-Reply-To: <877fye2spw.fsf@gmx.de> (Michael Albinus's message of "Sat, 29 Nov 2014 11:42:35 +0100") Message-ID: <87mw7afe90.fsf@gmx.us> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:XMESG9V9RVwdy6i6jUrcFRBeVaa/pf4BmujSCoCZOFAa51Fkb5K S9GHLTrh8Xim5m69e83bhtorQ/fsItJ4cQRQem/PlqI3uOYMylzmzGmWquN0pYeuLJj+9Qw ov406jblJSedtle57it9yB6GIDAd/kQ7BhKHuMYQ7u0KxraBNlAo2al7RxqdfcDpsYoJvm6 u+1cio0ys4z93kAnWEbxA== X-UI-Out-Filterresults: notjunk:1; X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 19192 Cc: 19192@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Hi, Sorry for asking so many questions. Michael Albinus writes: > Rasmus writes: >>> A possible fix might be to give a user an option, whether global >>> dired-listing-switches shall be used everywhere, or whether there shall >>> be special settings connection-oriented. >> >> So it turns out that arguments are tested via `ange-ftp-switches-ok'. >> So the easiest fix would probably be to extend this function to do a >> better job of checking. Unfortunately, I don't know if one can easily >> predict which ls commands will be understood and which not? E.g. does >> ftp ls depend on the host systems version of ls? > > I don't know exactly. But I guess the most stable patch would be to not > expect too much from ftp's ls. So according to the note in `ange-ftp-get-files' there's the following node on using dired-actual-switches or dired-listing-switches ;; This is an efficiency hack. We try to ;; anticipate what sort of listing dired ;; might want, and cache just such a listing. Switches are checked with `ange-ftp-switches-ok'. (man "sftp") has a nice list of switches supported. Unfortunately, I don't really find anything on supported ls in the manpage of ftp or the info manual... Option I: I can limit accepted ls flags by ange-ftp to the subset supported by sftp. Option I+: I could add a defcustom to allow the current more liberal behavior akin to ange-ftp-passive-host-alist and ange-ftp-try-passive-mode. Option II would be to add build-in support for something like the --group-directories-first in dired, since now, if scrub off --group-directories-first, a dired-ftp buffer will look different from a local dired buffer... For now I will go with Option I. Thanks, Rasmus -- The Kids call him Billy the Saint From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 29 07:22:06 2014 Received: (at 19192) by debbugs.gnu.org; 29 Nov 2014 12:22:06 +0000 Received: from localhost ([127.0.0.1]:48886 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xuh2L-0007C0-Oy for submit@debbugs.gnu.org; Sat, 29 Nov 2014 07:22:06 -0500 Received: from mout.gmx.net ([212.227.15.15]:54538) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xuh2I-0007Bf-1d for 19192@debbugs.gnu.org; Sat, 29 Nov 2014 07:22:03 -0500 Received: from W530 ([37.135.96.168]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0M6SJX-1Y5s8J2xSt-00yPNm; Sat, 29 Nov 2014 13:22:00 +0100 From: Rasmus To: michael.albinus@gmx.de Subject: Re: bug#19192: 25.0.50; TRAMP uses `dired-listing-switches' for ftp-connection References: <87tx1mrwwq.fsf@gmx.us> <87zjbe9j9c.fsf@gmx.de> <87h9xlil0f.fsf@gmx.us> <877fye2spw.fsf@gmx.de> <87mw7afe90.fsf@gmx.us> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAAAAAByaaZbAAAAAmJLR0QA/4ePzL8AAAAJcEhZ cwAAAEgAAABIAEbJaz4AAAIDSURBVEjHhZbLlSUhDEMJR2EptZuQY5oFtjHF6zMsqhdtIfkn3rKx zf6TB9sGAxGRn/yuHYtty5I0UDgigyueZRt2/Dm2kjEiApMExstsOboAKkY7Am9dgFnGsO+3ksaF kCQTUcpsL88zEMbaFAUIbHn5qo9dKdhkEZrABZiIuj8pJHHud0rikSRLhp0CR4+sVeF8C2sHklQA 9j/W1HIdm/CpEhmynrsHB9FZcwD4b8DWQUDA7s6a9fHMwLYJu7KOHbVOffLbk2GbwEQE3WivHuyE ZBdy/nJMAwBka41NUAUmHBuC02dLlcPstaXDSFzx72gMdRswCLqsfBguSJWoEK+kMVW9cxtQDPwV P0YvyNntPtwQJcDdhvaIdRNw9d3HaHoV16OnK+5eT6Aao0UH8YXqVDUkEZZZlxoOSrOqIAmkYzMj E07imXQEsgtQVpq4NIeaLFrUXlHWlM9jB92HuPtAqz85jHhgNI7hG01Rm7cdtfQUwxk/hiV4OweU fXxshqume/a2Z/AD8OnB2D0J7NBH0ukxYxlqXfHFwHi0xvCN5gE3Qwfze09hSnpnome1HephqIS5 nL9eLs02aJ2U+eTQT9HMWcs/jtKclIIGwWzc97E7ZeV/DGe+/c25AHrDR1l1Aa7LXLmeFPQA9gOS z0hF9yMh4RvQy1Xj1jbWP1Tm+Qe9IHnKji7ROAAAAABJRU5ErkJggg== Date: Sat, 29 Nov 2014 13:21:57 +0100 In-Reply-To: <87mw7afe90.fsf@gmx.us> (rasmus@gmx.us's message of "Sat, 29 Nov 2014 12:16:43 +0100") Message-ID: <87iohyfb8a.fsf@gmx.us> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Provags-ID: V03:K0:NCfNxCC+Gf6ZF4ycUxqIb1PEbdhmpl34TPN3V5B2WyVApm4DZI7 MykWuFwweR3Zj4CTizNB2nVymQwNk0D71uNnOgK2C3hkqASVK0rJTcSYR3bUUd0qYTEpf8i XuNxv0iiVHJHdA94ZHoZ8ubE+4aa7T53Py04WvNwcSp4asHsfbQGaA4sjgd3ct4Ufd4It+Y AV6kR9KkItoVg72qFOP0g== X-UI-Out-Filterresults: notjunk:1; X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 19192 Cc: 19192@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) --=-=-= Content-Type: text/plain Rasmus writes: > For now I will go with Option I. Well, turned out to be a bad idea. Instead I tested all flags in (man "ls") and exclude the flags that caused trouble. Note, I only have one ftp to test against. . . I'm assuming this one is somewhat common. Also, a limitation of the `ange-ftp-switches-ok' is that it's too destructive: I.e. rather than removing offending ls-flags, it will entirely disregard the whole thing. I guess that's another patch, though. If you find the patch OK, feel free to submit. Otherwise, let me know what to improve. Thanks, Rasmus -- The right to be left alone is a human right --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-ange-ftp.el-Disallow-more-dired-ls-flags.patch >From 6fd921e7d7deb88c5a3f172022b64a0539edbdd6 Mon Sep 17 00:00:00 2001 From: Rasmus Date: Sat, 29 Nov 2014 13:12:10 +0100 Subject: [PATCH] ange-ftp.el: Disallow more dired ls-flags * net/ange-ftp.el (ange-ftp-switches-ok): Disallow flags causing trouble with ls over ftp. These flags result in ls returning no output, causing Tramp-breakage. Fixes: debbugs:19192 --- lisp/ChangeLog | 6 ++++++ lisp/net/ange-ftp.el | 12 +++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2a450a7..7d0992e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2014-11-29 Rasmus Pank Roulund + + * net/ange-ftp.el (ange-ftp-switches-ok): Disallow flags causing + trouble with ls over ftp. These flags result in ls returning no + output, causing Tramp-breakage. (bug#19192) + 2014-11-29 Stephen Berman Stefan Monnier diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index d7632ed..a2b0b46 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el @@ -2831,16 +2831,26 @@ match subdirectories as well.") files ange-ftp-files-hashtable))) (defun ange-ftp-switches-ok (switches) - "Return SWITCHES (a string) if suitable for our use." + "Return SWITCHES (a string) if suitable for use with ls over ftp." (and (stringp switches) ;; We allow the A 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) + ;; Allow flags starting with a single dash (string-match "\\(\\`\\| \\)-[[:alpha:]]*l" switches) + ;; Disallow recursive flag (not (string-match "--recursive\\>\\|\\(\\`\\| \\)-[[:alpha:]]*R" switches)) + ;; Disallow most long flags from (man "ls"), version 8.23 of July 2014. + (not (string-match + (concat + "--\\(block-size\\|color\\|format\\|group-directories-first\\|" + "human-readable\\|dereference-command-line\\|hide\\|indicator-style\\|" + "dereference-command-line-symlink-to-dir\\|inode\\|ignore\\|dereference\\|" + "numeric-uid-gid\\|indicator-style\\|hide-control-chars\\|quoting-style\\|" + "sort\\|time\\|time-style\\|width\\)"))) switches)) (defun ange-ftp-get-files (directory &optional no-error) -- 2.1.3 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 29 07:47:47 2014 Received: (at 19192) by debbugs.gnu.org; 29 Nov 2014 12:47:47 +0000 Received: from localhost ([127.0.0.1]:48890 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XuhRC-0000gF-HS for submit@debbugs.gnu.org; Sat, 29 Nov 2014 07:47:47 -0500 Received: from mout.gmx.net ([212.227.15.19]:62126) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XuhRA-0000g7-6h for 19192@debbugs.gnu.org; Sat, 29 Nov 2014 07:47:45 -0500 Received: from W530 ([37.135.96.168]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0MXr3H-1XRGa94AYp-00Wn6r; Sat, 29 Nov 2014 13:47:43 +0100 From: Rasmus To: michael.albinus@gmx.de Subject: Re: bug#19192: 25.0.50; TRAMP uses `dired-listing-switches' for ftp-connection References: <87tx1mrwwq.fsf@gmx.us> <87zjbe9j9c.fsf@gmx.de> <87h9xlil0f.fsf@gmx.us> <877fye2spw.fsf@gmx.de> <87mw7afe90.fsf@gmx.us> <87iohyfb8a.fsf@gmx.us> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAHlBMVEUKFRJUbVlfi3YgQT2n 0Kvg/N5UophZjX8kV1c+lpjySPhsAAAACXBIWXMAAABIAAAASABGyWs+AAAB8ElEQVQ4y9VTwY7T QAydrDn02KiL6HGpirhOsJDCbQvJnV0yd5C6WfXIgWY50h5wj0ioyvwtz56kSKU/gKWm4/dsP4+d OJcsX8zcJbuuQ3N7Ac+qEELjLyQEtdt/amaVZoQGxzf4//CXgIQSU5fVoarDqWa2hMBVCDeoeeOy cDcS+bKaOvc23GXhHu7zZiSK5Urzwv2z8BGHK6QNxML06qZOUBivVFyb/4AGpkaMfRW5+d9CnYh6 JLJEvEKnn9VtVgNBmRHr9UP4pOInwuU5HpN4bNtKB1TlY0aR47ISY9z8XumApgPumNmxxAOoummq RSK8Z+eZWHrgcV1V73MbFrH35JlLLRVju26/mARAoAlHqePm2L5MG2HgxCwHI2IfN33COcUroSbv NlKwV4KoBA6il74X5gMcnyqh0Mk0ez4DQcTWEmyvP+iV/dx73MAnDWBS7nH2/FMgohpDAiuc8r1e kU38IHuSJKgPI7T2D/RDqXUjCPgEeNdGsTg/kKzDkvm2fezF69C0y0SQ80W3ffwVD1KqJKVSrBfZ da93Ty++d0+mmGbK9pLIbJdLuYW+rUGTSjsJz2WWdd1XqGMQRNiPI0+8Rwx5vXZaqbWLALg8rMZW qo2hJ6cEpdDh5RiAyfm3h1iDsnOCxsxz3P2H9gdT4qxCIzJxIQAAACV0RVh0ZGF0ZTpjcmVhdGUA MjAxMS0wNy0yMVQxNzoyNDo1NSswMjowMFwRps8AAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTEtMDct MjFUMTc6MjQ6NTUrMDI6MDAtTB5zAAAAAElFTkSuQmCC Date: Sat, 29 Nov 2014 13:47:41 +0100 In-Reply-To: <87iohyfb8a.fsf@gmx.us> (rasmus@gmx.us's message of "Sat, 29 Nov 2014 13:21:57 +0100") Message-ID: <877fyefa1e.fsf@gmx.us> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Provags-ID: V03:K0:0ULGFjAem7qGCae4x/jEUW96JJbCFjkswtjJSS8GNOmBf+pu86S HsXJsfgh162E614s3DfYs/HHjJRhRx5zTxHGtLH1FjpErpZUbbKEAGUVxgFdZ4cXEAs1bAt 5rQsrg3Jy0UM1rNFmM1SJkE8LJCdrshoXsvDC9XF0wyUNcp5MvSgFQCsSPM50Ax1V3NGhbr H7iIwne9iAHpNqHNc7iKQ== X-UI-Out-Filterresults: notjunk:1; X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 19192 Cc: 19192@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) --=-=-= Content-Type: text/plain Rasmus writes: > Rasmus writes: > >> For now I will go with Option I. > > Well, turned out to be a bad idea. Instead I tested all flags in (man > "ls") and exclude the flags that caused trouble. Note, I only have one > ftp to test against. . . I'm assuming this one is somewhat common. > > Also, a limitation of the `ange-ftp-switches-ok' is that it's too > destructive: I.e. rather than removing offending ls-flags, it will > entirely disregard the whole thing. I guess that's another patch, > though. > > If you find the patch OK, feel free to submit. Otherwise, let me know > what to improve. This patch uses the "right" email for the commit (I don't know if this matters much). Otherwise identical. -- The Kids call him Billy the Saint --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-ange-ftp.el-Disallow-more-dired-ls-flags.patch >From 6fd921e7d7deb88c5a3f172022b64a0539edbdd6 Mon Sep 17 00:00:00 2001 From: Rasmus Date: Sat, 29 Nov 2014 13:12:10 +0100 Subject: [PATCH 1/2] ange-ftp.el: Disallow more dired ls-flags * net/ange-ftp.el (ange-ftp-switches-ok): Disallow flags causing trouble with ls over ftp. These flags result in ls returning no output, causing Tramp-breakage. Fixes: debbugs:19192 --- lisp/ChangeLog | 6 ++++++ lisp/net/ange-ftp.el | 12 +++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2a450a7..7d0992e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2014-11-29 Rasmus Pank Roulund + + * net/ange-ftp.el (ange-ftp-switches-ok): Disallow flags causing + trouble with ls over ftp. These flags result in ls returning no + output, causing Tramp-breakage. (bug#19192) + 2014-11-29 Stephen Berman Stefan Monnier diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index d7632ed..a2b0b46 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el @@ -2831,16 +2831,26 @@ match subdirectories as well.") files ange-ftp-files-hashtable))) (defun ange-ftp-switches-ok (switches) - "Return SWITCHES (a string) if suitable for our use." + "Return SWITCHES (a string) if suitable for use with ls over ftp." (and (stringp switches) ;; We allow the A 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) + ;; Allow flags starting with a single dash (string-match "\\(\\`\\| \\)-[[:alpha:]]*l" switches) + ;; Disallow recursive flag (not (string-match "--recursive\\>\\|\\(\\`\\| \\)-[[:alpha:]]*R" switches)) + ;; Disallow most long flags from (man "ls"), version 8.23 of July 2014. + (not (string-match + (concat + "--\\(block-size\\|color\\|format\\|group-directories-first\\|" + "human-readable\\|dereference-command-line\\|hide\\|indicator-style\\|" + "dereference-command-line-symlink-to-dir\\|inode\\|ignore\\|dereference\\|" + "numeric-uid-gid\\|indicator-style\\|hide-control-chars\\|quoting-style\\|" + "sort\\|time\\|time-style\\|width\\)"))) switches)) (defun ange-ftp-get-files (directory &optional no-error) -- 2.1.3 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 30 06:10:44 2014 Received: (at 19192) by debbugs.gnu.org; 30 Nov 2014 11:10:44 +0000 Received: from localhost ([127.0.0.1]:49582 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xv2Oq-0005TW-6x for submit@debbugs.gnu.org; Sun, 30 Nov 2014 06:10:44 -0500 Received: from mout.gmx.net ([212.227.17.22]:62194) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xv2On-0005TN-M7 for 19192@debbugs.gnu.org; Sun, 30 Nov 2014 06:10:42 -0500 Received: from detlef.gmx.de ([93.209.66.135]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0LyzW8-1XzBF81iYC-014AoL; Sun, 30 Nov 2014 12:10:38 +0100 From: Michael Albinus To: Rasmus Subject: Re: bug#19192: 25.0.50; TRAMP uses `dired-listing-switches' for ftp-connection References: <87tx1mrwwq.fsf@gmx.us> <87zjbe9j9c.fsf@gmx.de> <87h9xlil0f.fsf@gmx.us> <877fye2spw.fsf@gmx.de> <87mw7afe90.fsf@gmx.us> Date: Sun, 30 Nov 2014 12:10:37 +0100 In-Reply-To: <87mw7afe90.fsf@gmx.us> (rasmus@gmx.us's message of "Sat, 29 Nov 2014 12:16:43 +0100") Message-ID: <87a9393pw2.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:OonrNmyX+bfB/oxCtTv4tw82gi+9QXScF6+1tTEdZnPKu5kzbJ/ 66JkyIELgrW1lhUj+yVusBWcTk9f96dJQyrTDdmh4VVzHxcKK+pB+sfDc5+Q+ZtpaGvC+vQ /vszl+ttZdYCs7hHkxJCptuma15e6J55Gclo/6D076UehVA//aqn/aye0H36OCxFchczzi/ svw8zXJmy1hp2Xl8sMPEA== X-UI-Out-Filterresults: notjunk:1; X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 19192 Cc: 19192@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Rasmus writes: > Hi, Hi, > Sorry for asking so many questions. No problem. That's why we have debbugs that we can discuss the problem. > So according to the note in `ange-ftp-get-files' there's the following > node on using dired-actual-switches or dired-listing-switches > > ;; This is an efficiency hack. We try to > ;; anticipate what sort of listing dired > ;; might want, and cache just such a listing. > > Switches are checked with `ange-ftp-switches-ok'. (man "sftp") has a > nice list of > switches supported. Unfortunately, I don't really find anything on > supported ls in the manpage of ftp or the info manual... > > Option I: I can limit accepted ls flags by ange-ftp to the subset > supported by sftp. > > Option I+: I could add a defcustom to allow the current more liberal > behavior akin to ange-ftp-passive-host-alist and > ange-ftp-try-passive-mode. > > Option II would be to add build-in support for something like the > --group-directories-first in dired, since now, if scrub off > --group-directories-first, a dired-ftp buffer will look different from a > local dired buffer... > > For now I will go with Option I. Well, I'm a little bit confused. In the beginning, you have spoken about "ftp". Now you've switched to "sftp". These are very different cases, and ange-ftp.el is *not* responsible for sftp connections. Could you, please, clarify? > Thanks, > Rasmus Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 30 07:43:51 2014 Received: (at 19192) by debbugs.gnu.org; 30 Nov 2014 12:43:52 +0000 Received: from localhost ([127.0.0.1]:49598 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xv3qx-0000m3-A6 for submit@debbugs.gnu.org; Sun, 30 Nov 2014 07:43:51 -0500 Received: from mout.gmx.net ([212.227.15.15]:54681) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xv3qt-0000lq-Mt for 19192@debbugs.gnu.org; Sun, 30 Nov 2014 07:43:49 -0500 Received: from W530 ([109.201.154.153]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0Lymoh-1Xzxvp0K2h-0169Vg; Sun, 30 Nov 2014 13:43:46 +0100 From: Rasmus To: michael.albinus@gmx.de Subject: Re: bug#19192: 25.0.50; TRAMP uses `dired-listing-switches' for ftp-connection References: <87tx1mrwwq.fsf@gmx.us> <87zjbe9j9c.fsf@gmx.de> <87h9xlil0f.fsf@gmx.us> <877fye2spw.fsf@gmx.de> <87mw7afe90.fsf@gmx.us> <87a9393pw2.fsf@gmx.de> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAAAAAByaaZbAAAAAmJLR0QA/4ePzL8AAAAJcEhZ cwAAAEgAAABIAEbJaz4AAAJLSURBVEjHzZa7geQwDEMdoxm0wlJYCVtBMWgHwQXyT7O7txceI9vj J1EkCM8xSbWdJN2yx7mi0RJRCXU/PCqpWddecf3okm2hMpUHYMx7UTsDwPcCsTGC895BLz4uiXw/ QL3fz9Hh+162vVKWlCQF5Q2o+31v2+lJ0gDoJOUdqM/3LSoZjAUk0WzAzifxEIoxdgbKfsYcdz1e laJDJlGjvgXknaAaTAZF+BvAqh0ogJVURVD2qhxwbOohbKs1XBWAU3tZq2Oz7a2wnkpiT8XMnhL8 yO8WVLoS2+VUfwB0wtl3sEexMpXBfAKKkXkUfO4hygWOduII1v6NLSl12XEpEdld15wcQpb8+OTq ZmtXjPrU6EFlOkmE/BS27ebZB51Xu8wTTc+SOWXbZq15uMtWStJXmwo9U0vfkB276Et8N9A8eUGO LTgxa4otD3sDlpwvB1nFHSZpcJromPMClgFwqWqlLTWcsypmefgGmvKA8VmaIUAoa2STlPQATXSS DC7hDlpr9b57rT5eg7YCOi+XJHqSRwSt40uXKF91SmImfY6cSfhnYMmUswp19SZfgNs4jUqMs3kf rvFWxD3yZGJgn5+vwCNTYSx92tYn4JenNAHszvoJeOhE5y62pvhlRDdrh+Ii4MTL3qwPm9nyhzPl 1a1BjdSyN/t9A0K51hnGyYAAUN6c6dhagGuwVVkNs9mb930c+tns/laanvlLH1YMnxmv+Qeg+ml5 d/0GyI5vKxS2z+6366Nf1qlNTt8Cnn79g/Akv57h5/gPgT/tvnoH3s4GngAAAABJRU5ErkJggg== Date: Sun, 30 Nov 2014 13:43:44 +0100 In-Reply-To: <87a9393pw2.fsf@gmx.de> (Michael Albinus's message of "Sun, 30 Nov 2014 12:10:37 +0100") Message-ID: <874mtgamf3.fsf@gmx.us> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Provags-ID: V03:K0:PoB/1EEM3j4/a+A4KUFqMIexoKXv1O1XVVF57DbttEGJhhTxrO/ DOFvXit/vARxwAIIkqfkGpHAWWQFrgZiAAsm1+eI8GRSC87Es8fMNeXI1pFK8SF4U2jFdoh 1TqDfKBlFFpvQe3M4P8ufN3kbnn8HMSHy/2DiWNOHOUXm6WxrK60e9uScFoJfcrBSO0HOMq 1REPNJ8HbkxJNou0CSepA== X-UI-Out-Filterresults: notjunk:1; X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 19192 Cc: 19192@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) --=-=-= Content-Type: text/plain Hi, Michael Albinus writes: >> So according to the note in `ange-ftp-get-files' there's the following >> node on using dired-actual-switches or dired-listing-switches >> >> ;; This is an efficiency hack. We try to >> ;; anticipate what sort of listing dired >> ;; might want, and cache just such a listing. >> >> Switches are checked with `ange-ftp-switches-ok'. (man "sftp") has a >> nice list of >> switches supported. Unfortunately, I don't really find anything on >> supported ls in the manpage of ftp or the info manual... >> >> Option I: I can limit accepted ls flags by ange-ftp to the subset >> supported by sftp. >> >> Option I+: I could add a defcustom to allow the current more liberal >> behavior akin to ange-ftp-passive-host-alist and >> ange-ftp-try-passive-mode. >> >> Option II would be to add build-in support for something like the >> --group-directories-first in dired, since now, if scrub off >> --group-directories-first, a dired-ftp buffer will look different from a >> local dired buffer... >> >> For now I will go with Option I. > > Well, I'm a little bit confused. In the beginning, you have spoken about > "ftp". Now you've switched to "sftp". These are very different cases, > and ange-ftp.el is *not* responsible for sftp connections. > > Could you, please, clarify? That comment is obsolete. See why here: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19192#20 I tried all long commands with my ftp server (Debian-hosted) and discard the ones that breaks ls over ftp. Feel free to try the attached patch. Cheers, Rasmus -- If you can mix business and politics wonderful things can happen! --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-ange-ftp.el-Disallow-more-dired-ls-flags.patch >From 6fd921e7d7deb88c5a3f172022b64a0539edbdd6 Mon Sep 17 00:00:00 2001 From: Rasmus Date: Sat, 29 Nov 2014 13:12:10 +0100 Subject: [PATCH] ange-ftp.el: Disallow more dired ls-flags * net/ange-ftp.el (ange-ftp-switches-ok): Disallow flags causing trouble with ls over ftp. These flags result in ls returning no output, causing Tramp-breakage. Fixes: debbugs:19192 --- lisp/ChangeLog | 6 ++++++ lisp/net/ange-ftp.el | 12 +++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2a450a7..7d0992e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2014-11-29 Rasmus Pank Roulund + + * net/ange-ftp.el (ange-ftp-switches-ok): Disallow flags causing + trouble with ls over ftp. These flags result in ls returning no + output, causing Tramp-breakage. (bug#19192) + 2014-11-29 Stephen Berman Stefan Monnier diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index d7632ed..a2b0b46 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el @@ -2831,16 +2831,26 @@ match subdirectories as well.") files ange-ftp-files-hashtable))) (defun ange-ftp-switches-ok (switches) - "Return SWITCHES (a string) if suitable for our use." + "Return SWITCHES (a string) if suitable for use with ls over ftp." (and (stringp switches) ;; We allow the A 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) + ;; Allow flags starting with a single dash (string-match "\\(\\`\\| \\)-[[:alpha:]]*l" switches) + ;; Disallow recursive flag (not (string-match "--recursive\\>\\|\\(\\`\\| \\)-[[:alpha:]]*R" switches)) + ;; Disallow most long flags from (man "ls"), version 8.23 of July 2014. + (not (string-match + (concat + "--\\(block-size\\|color\\|format\\|group-directories-first\\|" + "human-readable\\|dereference-command-line\\|hide\\|indicator-style\\|" + "dereference-command-line-symlink-to-dir\\|inode\\|ignore\\|dereference\\|" + "numeric-uid-gid\\|indicator-style\\|hide-control-chars\\|quoting-style\\|" + "sort\\|time\\|time-style\\|width\\)"))) switches)) (defun ange-ftp-get-files (directory &optional no-error) -- 2.1.3 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 09 08:56:19 2014 Received: (at 19192) by debbugs.gnu.org; 9 Dec 2014 13:56:19 +0000 Received: from localhost ([127.0.0.1]:58795 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XyLGy-0002l9-PD for submit@debbugs.gnu.org; Tue, 09 Dec 2014 08:56:17 -0500 Received: from mout.gmx.net ([212.227.15.19]:62446) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XyLGu-0002kw-Mo for 19192@debbugs.gnu.org; Tue, 09 Dec 2014 08:56:13 -0500 Received: from detlef.gmx.de ([87.146.36.193]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0LlVZv-1XNcoG21hf-00bOOL; Tue, 09 Dec 2014 14:56:11 +0100 From: Michael Albinus To: Rasmus Subject: Re: bug#19192: 25.0.50; TRAMP uses `dired-listing-switches' for ftp-connection References: <87tx1mrwwq.fsf@gmx.us> <87zjbe9j9c.fsf@gmx.de> <87h9xlil0f.fsf@gmx.us> <877fye2spw.fsf@gmx.de> <87mw7afe90.fsf@gmx.us> <87a9393pw2.fsf@gmx.de> <874mtgamf3.fsf@gmx.us> Date: Tue, 09 Dec 2014 14:56:05 +0100 In-Reply-To: <874mtgamf3.fsf@gmx.us> (rasmus@gmx.us's message of "Sun, 30 Nov 2014 13:43:44 +0100") Message-ID: <878uihj5ai.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K0:QDErAwnV4IxSDIakrfxXiDPzYMeLLFle6322toVbxTh1Wbe5Ls1 tq5gmSDs8pDMcWELGSyOBVk9nLlsHUzb7O6Bsmw52+Tek6ZdE47CNhoRS6H333PAqKwbMiq c+KAg/jEQR3Of7pkVWV3mGnoP2fgKgATwovpvcdQrovYJE76Sr9x7EhGGMwBMGseStAmJFd p/nr17v3usPdqp/I380Pg== X-UI-Out-Filterresults: notjunk:1; X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 19192 Cc: 19192@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Rasmus writes: > Hi, Hi Rasmus, > That comment is obsolete. See why here: > > http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19192#20 > > I tried all long commands with my ftp server (Debian-hosted) and discard > the ones that breaks ls over ftp. > > Feel free to try the attached patch. Sorry, it took a while until I found the time to have a look on your patch. So far it seems to be OK, but wouldn't it be safer to disallow all options to ftp which start with "--"? I understand that you have checked it with your ftp client, but you cannot assume that everybody uses the same version of ftp and ls as you do. Samr for the ftp server. > Cheers, > Rasmus Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 10 08:16:32 2014 Received: (at 19192) by debbugs.gnu.org; 10 Dec 2014 13:16:32 +0000 Received: from localhost ([127.0.0.1]:60360 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xyh83-000064-IT for submit@debbugs.gnu.org; Wed, 10 Dec 2014 08:16:32 -0500 Received: from mout.gmx.net ([212.227.15.15]:62027) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xyh81-00005w-5B for 19192@debbugs.gnu.org; Wed, 10 Dec 2014 08:16:30 -0500 Received: from x200s ([109.201.152.25]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0MarNa-1YEa7F3bS6-00KQhC; Wed, 10 Dec 2014 14:16:28 +0100 From: Rasmus To: michael.albinus@gmx.de Subject: Re: bug#19192: 25.0.50; TRAMP uses `dired-listing-switches' for ftp-connection References: <87tx1mrwwq.fsf@gmx.us> <87zjbe9j9c.fsf@gmx.de> <87h9xlil0f.fsf@gmx.us> <877fye2spw.fsf@gmx.de> <87mw7afe90.fsf@gmx.us> <87a9393pw2.fsf@gmx.de> <874mtgamf3.fsf@gmx.us> <878uihj5ai.fsf@gmx.de> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAAAAAByaaZbAAAAAmJLR0QA/4ePzL8AAAAJcEhZ cwAAAEgAAABIAEbJaz4AAADHSURBVEjH7VXBEQMhCLQiOqEYSqEOuqEhkseduRMk8MlkJtnnysqC imP8NIBEnxD0JFMQT3ZCpwRkcrzGs11wbAhXTu7xYuYUdOck9vNS4MpdXa1rpjDUkRAXcGxHATcF frMYZwooxhvuSt6B457uId8r4K6g3aX2OVRPWufVwGaCYtmcPKCsRVVF/qg9grmBSa8UwskkZTtz DoVJBJLxRyX3WRKFtzOWSu43Cq7NcSzadwqq/xXU8DMvivT+IzXoCZDGHx/EA6ex0LZqsBZsAAAA AElFTkSuQmCC Date: Wed, 10 Dec 2014 14:16:25 +0100 In-Reply-To: <878uihj5ai.fsf@gmx.de> (Michael Albinus's message of "Tue, 09 Dec 2014 14:56:05 +0100") Message-ID: <87k31zfxw6.fsf@gmx.us> User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.4.51 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Provags-ID: V03:K0:GoKZxmeKaf2EOrnicbtpAdrmgsmRhTGYWTdwEZQzvlGJtOYZ8lT foLF+XqZFJEsxT2NtO/HC8m9SOo7TiLmS9ymbDBolTU0oWriMUGpACrg6kVYWEJ0pV4kJO4 iaoENG5g5r/fH5/ezjMgBzBUf/AeOab75rIE/MlwDUlX5eSSq1bRc+AEm7O2cWwe1D0RLww TK35nIgzuT7mxFt9APPmw== X-UI-Out-Filterresults: notjunk:1; X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 19192 Cc: 19192@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Michael Albinus writes: > So far it seems to be OK, but wouldn't it be safer to disallow all > options to ftp which start with "--"? I understand that you have checked > it with your ftp client, but you cannot assume that everybody uses the sa= me > version of ftp and ls as you do. Samr for the ftp server. As you prefer.=20=20 This patch disallow (string-match "--\\w\\{2,\\}" switches) which should be enough to capture switches starting with --, I guess. =E2=80=94Rasmus --=20 The right to be left alone is a human right --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-ange-ftp.el-Disallow-more-dired-ls-flags.patch >From 55bf708060ddf05a87df4f1f22185aceac74d9c6 Mon Sep 17 00:00:00 2001 From: Rasmus Date: Sat, 29 Nov 2014 13:12:10 +0100 Subject: [PATCH] ange-ftp.el: Disallow more dired ls-flags * net/ange-ftp.el (ange-ftp-switches-ok): Disallow flags causing trouble with ls over ftp. These flags result in ls returning no output, causing Tramp-breakage. Fixes: debbugs:19192 --- lisp/ChangeLog | 6 ++++++ lisp/net/ange-ftp.el | 8 ++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 454ee00..09b64f5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2014-11-29 Rasmus Pank Roulund + + * net/ange-ftp.el (ange-ftp-switches-ok): Disallow flags causing + trouble with ls over ftp. These flags result in ls returning no + output, causing Tramp-breakage. (bug#19192) + 2014-12-10 Andreas Schwab * files.el (file-tree-walk): Use file-name-as-directory diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index d7632ed..5e9bc27 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el @@ -2831,16 +2831,20 @@ match subdirectories as well.") files ange-ftp-files-hashtable))) (defun ange-ftp-switches-ok (switches) - "Return SWITCHES (a string) if suitable for our use." + "Return SWITCHES (a string) if suitable for use with ls over ftp." (and (stringp switches) ;; We allow the A 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) + ;; Allow flags starting with a single dash (string-match "\\(\\`\\| \\)-[[:alpha:]]*l" switches) + ;; Disallow recursive flag (not (string-match - "--recursive\\>\\|\\(\\`\\| \\)-[[:alpha:]]*R" switches)) + "\\(\\`\\| \\)-[[:alpha:]]*R" switches)) + ;; Disallow long flags. + (not (string-match "--\\w\\{2,\\}")) switches)) (defun ange-ftp-get-files (directory &optional no-error) -- 2.1.3 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 10 09:15:58 2014 Received: (at 19192) by debbugs.gnu.org; 10 Dec 2014 14:15:58 +0000 Received: from localhost ([127.0.0.1]:60393 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xyi3Z-0001cV-OT for submit@debbugs.gnu.org; Wed, 10 Dec 2014 09:15:58 -0500 Received: from cantor2.suse.de ([195.135.220.15]:43061 helo=mx2.suse.de) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xyi3W-0001cL-Gm for 19192@debbugs.gnu.org; Wed, 10 Dec 2014 09:15:55 -0500 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id A4B2DAC40; Wed, 10 Dec 2014 14:15:53 +0000 (UTC) From: Andreas Schwab To: Rasmus Subject: Re: bug#19192: 25.0.50; TRAMP uses `dired-listing-switches' for ftp-connection References: <87tx1mrwwq.fsf@gmx.us> <87zjbe9j9c.fsf@gmx.de> <87h9xlil0f.fsf@gmx.us> <877fye2spw.fsf@gmx.de> <87mw7afe90.fsf@gmx.us> <87a9393pw2.fsf@gmx.de> <874mtgamf3.fsf@gmx.us> <878uihj5ai.fsf@gmx.de> <87k31zfxw6.fsf@gmx.us> X-Yow: I can't think about that. It doesn't go with HEDGES in the shape of LITTLE LULU -- or ROBOTS making BRICKS... Date: Wed, 10 Dec 2014 15:15:53 +0100 In-Reply-To: <87k31zfxw6.fsf@gmx.us> (rasmus@gmx.us's message of "Wed, 10 Dec 2014 14:16:25 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 19192 Cc: 19192@debbugs.gnu.org, michael.albinus@gmx.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Rasmus writes: > diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el > index d7632ed..5e9bc27 100644 > --- a/lisp/net/ange-ftp.el > +++ b/lisp/net/ange-ftp.el > @@ -2831,16 +2831,20 @@ match subdirectories as well.") > files ange-ftp-files-hashtable))) > > (defun ange-ftp-switches-ok (switches) > - "Return SWITCHES (a string) if suitable for our use." > + "Return SWITCHES (a string) if suitable for use with ls over ftp." > (and (stringp switches) > ;; We allow the A 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) > + ;; Allow flags starting with a single dash > (string-match "\\(\\`\\| \\)-[[:alpha:]]*l" switches) > + ;; Disallow recursive flag > (not (string-match > - "--recursive\\>\\|\\(\\`\\| \\)-[[:alpha:]]*R" switches)) > + "\\(\\`\\| \\)-[[:alpha:]]*R" switches)) > + ;; Disallow long flags. > + (not (string-match "--\\w\\{2,\\}")) This contradicts the first string-match. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different." From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 10 10:28:30 2014 Received: (at 19192) by debbugs.gnu.org; 10 Dec 2014 15:28:31 +0000 Received: from localhost ([127.0.0.1]:60773 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XyjBm-0003nJ-4v for submit@debbugs.gnu.org; Wed, 10 Dec 2014 10:28:30 -0500 Received: from mout.gmx.net ([212.227.17.22]:54017) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XyjBi-0003n9-9J for 19192@debbugs.gnu.org; Wed, 10 Dec 2014 10:28:27 -0500 Received: from x200s ([46.166.186.247]) by mail.gmx.com (mrgmx103) with ESMTPSA (Nemesis) id 0Lhf3N-1Xd7ot3KMb-00mtci; Wed, 10 Dec 2014 16:28:23 +0100 From: Rasmus To: schwab@suse.de Subject: Re: bug#19192: 25.0.50; TRAMP uses `dired-listing-switches' for ftp-connection References: <87tx1mrwwq.fsf@gmx.us> <87zjbe9j9c.fsf@gmx.de> <87h9xlil0f.fsf@gmx.us> <877fye2spw.fsf@gmx.de> <87mw7afe90.fsf@gmx.us> <87a9393pw2.fsf@gmx.de> <874mtgamf3.fsf@gmx.us> <878uihj5ai.fsf@gmx.de> <87k31zfxw6.fsf@gmx.us> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAArCAMAAAAJzfvtAAAAPFBMVEX39/fS1NifoZ9gYFoZ Ghna5O1/p4JUOSup3LWTqeShXDLCajpmcNh3jNxOT59+oeDE8Lpoo2J8xnGIyXCo3RooAAACK0lE QVRIx4VWC7LDIAgU8J+YRL3/XR/YJs9Y09JMp+OwsIsBqtTdAIm0GBGA+mXGOvEkJEvEPx1+9+fQ hGBONCBj/LM7srsZzoLT7jk8zThzFnzw788RL7DhSBN/rfuaoIugLnp2gnDuxp4WhwEAjBjX7oMV 6Zu/cYtbQ0ophNBAVsNQH1Q9AuOyBbWuKQhm3w3ruAtw6hYBl7iqwACVkiQMu7nJGBMqYaTSG8AP Z+l9zFgEiFGvak0MCAIQKaFzYvBdMsbYJLwAfN3JKNj+U7ixyhSZkQCC2tmUaagNL0Zjkd8SEqNU CjuzEiErXTUd3ntwcVuFJDN/iW5fOyd8ERhfR5awbmviKjEpEZEaEU4ZmlaiT0YolTHwuoMQVNqZ WQsw0QxukRO42ii8tIsoNqO0HRgtsa+CMQDi3igGCaNtr9l4YoAZBwMjwvam0lf1sLnwqz1vyfOu uzuHUmu1meYT5eTeibb1KJkxedbccFKhq9kgH744yr4c06GC5yQ542H1uerIOY5phnsqMEeVT87Z zijBf9M1EYClHIf3OdeSyzcJrR/gYL0SvzEqBWYSoOs4cfe18hMj1WmGvi1Ji3/hyJUYUPzxNUEb e75kzyNLPV3z0Peoyb9LEacTeZxLTOrtBnZ6yTQOIuWGyTEKsJ/TWD8uNLDTeU+TKI3+sDl6hIP5 IsMvOw7uU1n5Lzvuf4uaa4v+XLwGzz1Nbb0T/lztjNnaPwHn7LzSf8IxFWG39VlGAAAAAElFTkSu QmCC Date: Wed, 10 Dec 2014 16:28:20 +0100 In-Reply-To: (Andreas Schwab's message of "Wed, 10 Dec 2014 15:15:53 +0100") Message-ID: <87fvcnfrsb.fsf@gmx.us> User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.4.51 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Provags-ID: V03:K0:wgkCqmrNomVBS9J0v9jmya5TMBZJ8f0XaW5IH2050CuH+a6nrNX M4JJX++tOM7+5KbiWy15a7pxY/B3gslX6P35B1Ii1JkWkQc1nZ76YLIYRo+B6L6XQd9icRT SeSArGwwUaQCtqpTvszbadCRAJDN+fJT9pBalveAJHKLYRrVnGAAQwQxsACVEne4w3lOUZz +s4YsPrp+W3JRt7nOKbGA== X-UI-Out-Filterresults: notjunk:1; X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 19192 Cc: 19192@debbugs.gnu.org, michael.albinus@gmx.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Andreas Schwab writes: > Rasmus writes: > >> diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el >> index d7632ed..5e9bc27 100644 >> --- a/lisp/net/ange-ftp.el >> +++ b/lisp/net/ange-ftp.el >> @@ -2831,16 +2831,20 @@ match subdirectories as well.") >> files ange-ftp-files-hashtable))) >>=20=20 >> (defun ange-ftp-switches-ok (switches) >> - "Return SWITCHES (a string) if suitable for our use." >> + "Return SWITCHES (a string) if suitable for use with ls over ftp." >> (and (stringp switches) >> ;; We allow the A 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) >> + ;; Allow flags starting with a single dash >> (string-match "\\(\\`\\| \\)-[[:alpha:]]*l" switches) >> + ;; Disallow recursive flag >> (not (string-match >> - "--recursive\\>\\|\\(\\`\\| \\)-[[:alpha:]]*R" switches)) >> + "\\(\\`\\| \\)-[[:alpha:]]*R" switches)) >> + ;; Disallow long flags. >> + (not (string-match "--\\w\\{2,\\}")) > > This contradicts the first string-match. You are right. How about this one: allow --(almost-)all for legacy reasons. Disallow other long flags. Allow short flag as long as their is an "l" and not an "R"? (At least that was the intention). =E2=80=94Rasmus --=20 Together we will make the possible totalllly impossible! --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-ange-ftp.el-Disallow-more-dired-ls-flags.patch >From 07f99a06a30e271989a27dc58a2db54602d60e51 Mon Sep 17 00:00:00 2001 From: rasmus Date: Wed, 10 Dec 2014 16:18:00 +0100 Subject: [PATCH] ange-ftp.el: Disallow more dired ls-flags * net/ange-ftp.el (ange-ftp-switches-ok): Disallow most lonng flags, as they may cause Tramp-breakage. Fixes: debbugs:19192 --- lisp/ChangeLog | 6 ++++++ lisp/net/ange-ftp.el | 20 ++++++++++++++------ 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 454ee00..09b64f5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2014-11-29 Rasmus Pank Roulund + + * net/ange-ftp.el (ange-ftp-switches-ok): Disallow flags causing + trouble with ls over ftp. These flags result in ls returning no + output, causing Tramp-breakage. (bug#19192) + 2014-12-10 Andreas Schwab * files.el (file-tree-walk): Use file-name-as-directory diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index d7632ed..db79c0d 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el @@ -2831,16 +2831,24 @@ match subdirectories as well.") files ange-ftp-files-hashtable))) (defun ange-ftp-switches-ok (switches) - "Return SWITCHES (a string) if suitable for our use." + "Return SWITCHES (a string) if suitable for use with ls over ftp." (and (stringp switches) - ;; We allow the A switch, which lists all files except "." and - ;; "..". This is OK because we manually insert these entries - ;; in the hash table. + ;; 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) + "--\\(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 - "--recursive\\>\\|\\(\\`\\| \\)-[[:alpha:]]*R" switches)) + "\\(\\`\\| \\)-[[:alpha:]]*R" switches)) switches)) (defun ange-ftp-get-files (directory &optional no-error) -- 2.1.3 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 10 11:49:26 2014 Received: (at 19192-done) by debbugs.gnu.org; 10 Dec 2014 16:49:26 +0000 Received: from localhost ([127.0.0.1]:60853 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XykS6-0005yn-M3 for submit@debbugs.gnu.org; Wed, 10 Dec 2014 11:49:26 -0500 Received: from mout.gmx.net ([212.227.17.22]:55089) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XykS5-0005ye-0M for 19192-done@debbugs.gnu.org; Wed, 10 Dec 2014 11:49:25 -0500 Received: from detlef.gmx.de ([79.195.28.53]) by mail.gmx.com (mrgmx103) with ESMTPSA (Nemesis) id 0LhwAY-1XdO4J21Vy-00nAh3; Wed, 10 Dec 2014 17:49:21 +0100 From: Michael Albinus To: Rasmus Subject: Re: bug#19192: 25.0.50; TRAMP uses `dired-listing-switches' for ftp-connection References: <87tx1mrwwq.fsf@gmx.us> <87zjbe9j9c.fsf@gmx.de> <87h9xlil0f.fsf@gmx.us> <877fye2spw.fsf@gmx.de> <87mw7afe90.fsf@gmx.us> <87a9393pw2.fsf@gmx.de> <874mtgamf3.fsf@gmx.us> <878uihj5ai.fsf@gmx.de> <87k31zfxw6.fsf@gmx.us> <87fvcnfrsb.fsf@gmx.us> Date: Wed, 10 Dec 2014 17:49:19 +0100 In-Reply-To: <87fvcnfrsb.fsf@gmx.us> (rasmus@gmx.us's message of "Wed, 10 Dec 2014 16:28:20 +0100") Message-ID: <87h9x3jvqo.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K0:2FpQAlJaLNEjv8va+sECG4ILom7lekwJd7Uo9fyPIpsX7d+Dbk5 FO/JIeM+E1otUNr1PXnUm1lMGH15dj458a18PgI2LBul3Lp3yjU6AeLEFQMhyHWrWyJRHxf fNbbn1xdT3Oy7IeI4CElaKVU+Eu/o/I0MmDffDQlVRtpnlhaCXrj1E8HAZMbtd9gtqHetPm RUtLjtjmau3hg9yJv/t/w== X-UI-Out-Filterresults: notjunk:1; X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 19192-done Cc: schwab@suse.de, 19192-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Rasmus writes: > How about this one: allow --(almost-)all for legacy reasons. Disallow > other long flags. Allow short flag as long as their is an "l" and not an > "R"? (At least that was the intention). Looks good. I've committed it to the trunk, closing the bug. > =E2=80=94Rasmus Thanks, and best regards, Michael. From unknown Mon Jun 23 22:03:45 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 08 Jan 2015 12:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator